摘要:
对于Object.clone()方法说明 阅读全文
摘要:
当你把对象加入HashSet时,HashSet会先计算对象的hashcode值来判断对象加入的位置,同时也会和其他加入的对象的hashcode值作比较,如果没有相符的hashcode,HashSet会假设对象没有重复出现,但是如果发现有相同的hashcode值的对象,这时候会调用equals方法来检 阅读全文
摘要:
执行顺序: 父类 static 子类 static 父类普通代码块 父类 constructor 子类 普通代码块 子类 constructo 阅读全文
摘要:
题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in t 阅读全文
摘要:
题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or anothe 阅读全文
摘要:
题目: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) – Push element x onto stack. pop() – R 阅读全文
摘要:
题目: Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999 解答: 阅读全文
摘要:
题目: Given a matrix of m ✕ n elements (m rows, n columns), return all elements of the matrix in spiral order.For example, given the following matrix:[[ 阅读全文
摘要:
题目: Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example, given the below binary tree,1/ \2 4 阅读全文
摘要:
题目: Given an array where elements are sorted in ascending order, convert it to BST 解答: 阅读全文