码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
[LeetCode]41 First Missing Positive
https://oj.leetcode.com/problems/first-missing-positive/http://blog.csdn.net/linhuanmars/article/details/20884585publicclassSolution{ publicintfirstMissingPositive(int[]A){ //如果可以排序,排序后从1开始检查 //如果一个数为3,把它置换到第三个空格 //i不动,..
分类:其他好文   时间:2015-01-03 13:25:09    阅读次数:133
[LeetCode]43 Multiply Strings
https://oj.leetcode.com/problems/multiply-strings/http://blog.csdn.net/linhuanmars/article/details/20967763importjava.math.BigInteger; publicclassSolution{ publicStringmultiply(Stringnum1,Stringnum2) { //SolutionB: //returnmultiply_Cheating(num1,num2); //..
分类:其他好文   时间:2015-01-03 13:24:48    阅读次数:158
[LeetCode]48 Rotate Image
https://oj.leetcode.com/problems/rotate-p_w_picpath/http://blog.csdn.net/linhuanmars/article/details/21503683publicclassSolution{ //Assumeitisan*n. publicvoidrotate(int[][]matrix) { //SolutionA: //rotate_ExtraMatrix(matrix); //SolutionB: rotate_TwoRotate(..
分类:其他好文   时间:2015-01-03 13:23:23    阅读次数:309
[LeetCode]45 Jump Game II
https://oj.leetcode.com/problems/jump-game-ii/http://blog.csdn.net/linhuanmars/article/details/21356187publicclassSolution{ publicintjump(int[]A) { //[2,3,1,1,4] //[2,1,2,1,0] if(A==null||A.length<=1) return0; intlen=A.length; intstart=0; intend=0; int..
分类:其他好文   时间:2015-01-03 13:23:05    阅读次数:159
[LeetCode]49 Anagrams
https://oj.leetcode.com/problems/anagrams/http://blog.csdn.net/linhuanmars/article/details/21664747publicclassSolution{ publicList<String>anagrams(String[]strs){ intlen=strs.length; Map<Map<Integer,Integer>,List<String>>map=newHash..
分类:其他好文   时间:2015-01-03 13:22:23    阅读次数:194
[LeetCode]47 Permutations II
https://oj.leetcode.com/problems/permutations-ii/http://blog.csdn.net/linhuanmars/article/details/21570835publicclassSolution{ publicList<List<Integer>>permuteUnique(int[]num) { //SolutionA: //returnpermuteUnique_Swap(num); //SolutionB: returnp..
分类:其他好文   时间:2015-01-03 13:21:53    阅读次数:143
[LeetCode]50 Pow(x, n)
https://oj.leetcode.com/problems/powx-n/http://blog.csdn.net/linhuanmars/article/details/20092829publicclassSolution{ publicdoublepow(doublex,intn){ //SolutionA: //returnpow_Recursion(x,n); //SolutionB: returnpow_Shift(x,n); } //////////////////////// //S..
分类:其他好文   时间:2015-01-03 13:20:11    阅读次数:150
[LeetCode]51 N-Queens
https://oj.leetcode.com/problems/n-queens/http://blog.csdn.net/linhuanmars/article/details/20667175publicclassSolution{ publicList<String[]>solveNQueens(intn){ List<String[]>result=newArrayList<>(); int[]qcols=newint[n]; solve(n,0,qcols,r..
分类:其他好文   时间:2015-01-03 08:14:06    阅读次数:214
[LeetCode]52 N-Queens II
https://oj.leetcode.com/problems/n-queens-ii/http://blog.csdn.net/linhuanmars/article/details/20668017SameasN-Queens.publicclassSolution{ publicinttotalNQueens(intn){ Resultresult=newResult(); int[]qcols=newint[n]; resolve(n,0,qcols,result); returnresult.va..
分类:其他好文   时间:2015-01-03 08:13:17    阅读次数:149
[LeetCode]40 Combination Sum II
https://oj.leetcode.com/problems/combination-sum-ii/http://blog.csdn.net/linhuanmars/article/details/20829099publicclassSolution{ publicList<List<Integer>>combinationSum2(int[]num,inttarget) { if(num==null||num.length==0) returnCollections.empty..
分类:其他好文   时间:2015-01-03 08:12:50    阅读次数:185
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!