Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array nums = [1,1,1,2,2,3],
Your function should return length = 5, with the first five e...
分类:
其他好文 时间:
2015-06-15 22:16:46
阅读次数:
103
Activity.finish()Call this when your activity is done and should be closed.在你的activity动作完成的时候,或者Activity需要关闭的时候,调用此方法。当你调用此方法的时候,系统只是将最上面的Activity移出了栈...
分类:
移动开发 时间:
2015-06-15 21:49:37
阅读次数:
120
题目:
Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.解答:class Solution {
public:
int trailingZeroes(int n) {
int...
分类:
其他好文 时间:
2015-06-15 20:33:08
阅读次数:
119
Improve response times and handle more users with parallel processingBuilding a web application using non blocking calls to the data layer is a great ...
分类:
Web程序 时间:
2015-06-15 20:10:03
阅读次数:
167
Description:Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->...
分类:
其他好文 时间:
2015-06-14 21:14:03
阅读次数:
116
Description:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lis...
分类:
其他好文 时间:
2015-06-14 21:13:10
阅读次数:
103
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
系统相关 时间:
2015-06-14 16:23:48
阅读次数:
176
Description:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices o...
分类:
其他好文 时间:
2015-06-14 13:44:40
阅读次数:
119
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2015-06-14 09:37:20
阅读次数:
103
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. Y...
分类:
其他好文 时间:
2015-06-14 09:32:09
阅读次数:
144