码迷,mamicode.com
首页 >  
搜索关键字:should    ( 4948个结果
[LeetCode] 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...
分类:其他好文   时间:2015-03-10 11:59:59    阅读次数:151
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 spa...
分类:其他好文   时间:2015-03-10 10:26:23    阅读次数:136
LeetCode | #24 Swap Nodes in Pairs
题目: 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...
分类:其他好文   时间:2015-03-09 20:58:23    阅读次数:129
Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ...
分类:其他好文   时间:2015-03-09 15:52:47    阅读次数:92
杭电1062-字符串翻转
这是天津大学2015考研的编程题Problem DescriptionIgnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should ...
分类:其他好文   时间:2015-03-09 14:17:07    阅读次数:248
Lintcode: Longest Common Substring
Given two strings, find the longest common substring.Return the length of it.NoteThe characters in substring should occur continiously in original str...
分类:其他好文   时间:2015-03-09 12:17:48    阅读次数:105
LeetCode_Merge Two Sorted Lists
题目链接:https://leetcode.com/problems/merge-two-sorted-lists/ 题目: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 ...
分类:其他好文   时间:2015-03-09 11:05:29    阅读次数:134
use of undeclared identifier *** , did you mean ***. in xcode
A property is not the same thing os a instance variable, you should read a little bit of them, there's plenty of sources in the internet.Summarizing, ...
分类:其他好文   时间:2015-03-09 10:48:57    阅读次数:168
Lintcode: Longest Common Subsequence
Given two strings, find the longest comment subsequence (LCS).Your code should return the length of LCS.ExampleFor "ABCD" and "EDCA", the LCS is "A" (...
分类:其他好文   时间:2015-03-09 09:20:00    阅读次数:141
LeetCode-137 Single Number II
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:其他好文   时间:2015-03-09 00:24:08    阅读次数:129
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!