题目:Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should...
分类:
其他好文 时间:
2014-10-26 22:37:58
阅读次数:
196
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 nu...
分类:
其他好文 时间:
2014-10-26 21:10:30
阅读次数:
170
Given an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) justified.You should p...
分类:
其他好文 时间:
2014-10-26 18:19:51
阅读次数:
204
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.
You should pack your words in a greedy approach; that i...
分类:
其他好文 时间:
2014-10-26 17:05:25
阅读次数:
175
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...
分类:
其他好文 时间:
2014-10-26 17:04:21
阅读次数:
193
Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run in O(n) time and uses constant...
分类:
其他好文 时间:
2014-10-26 14:25:50
阅读次数:
177
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover t...
分类:
其他好文 时间:
2014-10-26 13:08:38
阅读次数:
172
Question:want to close the old Session - if the same username starts a new SessionAny ideas how i can do this? - one user should not be able to start ...
分类:
其他好文 时间:
2014-10-26 10:19:28
阅读次数:
267
Solution: when see question about two strings , DP should be considered first.We can abstract this question to calculate appear times for string T wit...
分类:
其他好文 时间:
2014-10-26 00:12:57
阅读次数:
211
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
编程语言 时间:
2014-10-25 22:57:35
阅读次数:
480