摘要:
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken into on the same night. 阅读全文
摘要:
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. 阅读全文
摘要:
Given a **non-empty** array of integers, every element appears *twice* except for one. Find that single one. 阅读全文
摘要:
大家都知道斐波那契数列,现在要求输入一个整数n,请你输出斐波那契数列的第n项(从0开始,第0项为0) 阅读全文
摘要:
把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。 输入一个非减排序的数组的一个旋转,输出旋转数组的最小元素。 阅读全文
摘要:
用两个栈来实现一个队列,完成队列的Push和Pop操作。 队列中的元素为int类型。 阅读全文
摘要:
垃圾收集主要是针对堆和方法区两部分内存,程序计数器和Java虚拟机栈,还有本地方法栈,都随着线程的存在而存在,随着线程的消亡而消亡,因此不需要对这三个部分进行垃圾收集。 阅读全文
摘要:
对象的内存布局和对象的访问定位 阅读全文
摘要:
并发中断机制 阅读全文
摘要:
Daemon,sleep(),yield() 阅读全文