题目1534:数组中第K小的数字
时间限制:2 秒
内存限制:128 兆
特殊判题:否
提交:1524
解决:307
题目描述:
给定两个整型数组A和B。我们将A和B中的元素两两相加可以得到数组C。
譬如A为[1,2],B为[3,4].那么由A和B中的元素两两相加得到的数组C为[4,5,5,6]。
现在给你数组A和B,求由A和B两两相加...
分类:
编程语言 时间:
2015-01-03 00:58:44
阅读次数:
250
题目1525:子串逆序打印
时间限制:1 秒
内存限制:128 兆
特殊判题:否
提交:2404
解决:388
题目描述:
小明手中有很多字符串卡片,每个字符串中都包含有多个连续的空格,而且这些卡片在印刷的过程中将字符串的每个子串都打印反了,现在麻烦你帮小明将这些字符串中的子串修正过来,同时为了使卡片美观,压缩其中的连续空格为1个。...
分类:
其他好文 时间:
2015-01-03 00:57:37
阅读次数:
149
https://oj.leetcode.com/problems/convert-sorted-array-to-binary-search-tree/http://fisherlei.blogspot.com/2013/03/leetcode-convert-sorted-array-to-binary.html/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNod..
分类:
其他好文 时间:
2015-01-02 16:19:16
阅读次数:
151
https://oj.leetcode.com/problems/two-sum/http://fisherlei.blogspot.com/2013/03/leetcode-two-sum-solution.htmlpublicclassSolution{
publicint[]twoSum(int[]numbers,inttarget){
//SolutionA
//returntwoSum_SortAndTwoPointer(numbers,target);
//SolutionB
returntw..
分类:
其他好文 时间:
2015-01-02 16:17:51
阅读次数:
144
https://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/http://fisherlei.blogspot.com/2013/01/leetcode-convert-sorted-list-to-binary.htmlhttp://blog.csdn.net/worldwindjp/article/details/39722643/**
*Definitionforsingly-linkedlist.
*public..
分类:
其他好文 时间:
2015-01-02 16:17:43
阅读次数:
215
https://oj.leetcode.com/problems/permutations/http://fisherlei.blogspot.com/2012/12/leetcode-permutations.htmlTODOseesubsetcombination,nextpublicclassSolution{
//Assumesallinputnumbersareunique
publicList<List<Integer>>permute(int[]num){
retur..
分类:
其他好文 时间:
2015-01-02 16:17:16
阅读次数:
126
https://oj.leetcode.com/problems/add-two-numbers/http://fisherlei.blogspot.com/2013/01/leetcode-add-two-numbers-solution.html/**
*Definitionforsingly-linkedlist.
*publicclassListNode{
*intval;
*ListNodenext;
*ListNode(intx){
*val=x;
*next=null;
*}
*}
*/
pub..
分类:
其他好文 时间:
2015-01-02 16:16:51
阅读次数:
132
https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/http://fisherlei.blogspot.com/2012/12/leetcode-longest-substring-without.htmlpublicclassSolution{
publicintlengthOfLongestSubstring(Strings){
if(s==null||s.isEmpty())
return0;/..
分类:
其他好文 时间:
2015-01-02 16:16:01
阅读次数:
119
https://oj.leetcode.com/problems/longest-palindromic-substring/http://fisherlei.blogspot.com/2012/12/leetcode-longest-palindromic-substring.htmlpublicclassSolution{
publicStringlongestPalindrome(Strings){
//SolutionA:
returnlongestPalindrome_Center(s);
}
..
分类:
其他好文 时间:
2015-01-02 16:15:08
阅读次数:
122
https://oj.leetcode.com/problems/zigzag-conversion/http://fisherlei.blogspot.com/2013/01/leetcode-zigzag-conversion.htmlpublicclassSolution{
publicStringconvert(Strings,intnRows){
//SolutionA:
returnconvert_NoNewMatrix(s,nRows);
}
////////////////////////..
分类:
其他好文 时间:
2015-01-02 16:13:47
阅读次数:
140