码迷,mamicode.com
首页 >  
搜索关键字:should    ( 4948个结果
leetcode第40题--First Missing Positive
题目: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
[LeetCode] TwoSum
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
Text Justification
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
leetcode - Text Justification
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
Two Sum
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
leetcode - First Missing Positive
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
leetcode - Wildcard Matching
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
how to close the old Session - if the same username starts a new Session?
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
leetcode-distinct sequences
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
面试题:实现LRUCache::Least Recently Used的缩写,意思是最近最少使用,它是一种Cache替换算法
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!