码迷,mamicode.com
首页 >  
搜索关键字:lintcode    ( 1584个结果
Lintcode: Backpack
Given n items with size A[i], an integer m denotes the size of a backpack. How full you can fill this backpack? NoteYou can not divide any item into s...
分类:其他好文   时间:2015-02-03 09:27:39    阅读次数:160
Lintcode: A+B problem
For given numbers a and b in function aplusb, return the sum of them.NoteYou don't need to parse the input and output. Just calculate and return.Examp...
分类:其他好文   时间:2015-02-03 06:59:57    阅读次数:122
[LintCode] Rehashing
http://lintcode.com/en/problem/rehashing/#/** *DefinitionforListNode *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolution{ /** *@paramhashTable:AlistofThefirstnodeoflinkedlist *@return:AlistofThefir..
分类:其他好文   时间:2015-01-14 18:16:17    阅读次数:211
[LintCode] Compare Strings
http://lintcode.com/en/problem/compare-strings/publicclassSolution{ /** *@paramA:AstringincludesUpperCaseletters *@paramB:AstringincludesUpperCaseletter *@return:ifstringAcontainsallofthecharactersinBreturntrueelsereturnfalse */ publicbooleancompareStrings(..
分类:其他好文   时间:2015-01-14 18:11:48    阅读次数:145
[LintCode] Kth Prime Number
http://lintcode.com/en/problem/kth-prime-number/#classSolution{ /** *@paramk:Thenumberk. *@return:Thekthprimenumberasdescription. */ publiclongkthPrimeNumber(intk){ //writeyourcodehere Queue<Long>q3=newLinkedList<>(); q3.offer(3L); Queue<Lon..
分类:其他好文   时间:2015-01-14 18:08:01    阅读次数:163
lintcode backpack
Given n items with size A[i], an integer m denotes the size of a backpack. How full you can fill this backpack?注意You can not divide any item into smal...
分类:其他好文   时间:2015-01-14 08:29:24    阅读次数:339
[LintCode] Backpack II
http://lintcode.com/en/problem/backpack-ii/publicintbackPackII(intm,int[]A,intV[]){ //writeyourcodehere //Bruteforce //returnhelp(m,A,V,0,0,0); int[][]max=newint[A.length+1][m+1]; for(int[]t:max) Arrays.fill(t,-1); for(inti=0;i<A.length+1;i++) max[i]..
分类:其他好文   时间:2015-01-12 11:09:10    阅读次数:194
LintCode-Minimum Path Sum
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path. ...
分类:其他好文   时间:2015-01-09 09:10:42    阅读次数:176
LintCode-Serialization and Deserialization Of Binary Tree
Design an algorithm and write code to serialize and deserialize a binary tree. Writing the tree to a file is called 'serialization' and reading back f...
分类:其他好文   时间:2015-01-08 13:17:33    阅读次数:207
Lintcode:Longest Common Subsequence 解题报告
Longest Common SubsequenceGiven two strings, find the longest comment subsequence (LCS).Your code should return the length of LCS.样例For "ABCD" and "ED...
分类:其他好文   时间:2015-01-03 15:55:06    阅读次数:177
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!