文章
【leetcode】59. Spiral Matrix II 方阵向内循环
1.题目Givenanintegern,generateasquarematrixfilledwithelementsfrom1ton2inspiralorder.Forexample,Givenn3,Youshouldretur
【leetcode】58. Length of Last Word 字符串的末尾词的长度
1.题目Givenastringsconsistsofupper/lowercasealphabetsandemptyspacecharacters&39;&39;,returnthelengthoflastwordinthestrin
【leetcode】57. Insert Interval
1.题目Givenasetofnonoverlappingintervals,insertanewintervalintotheintervals(mergeifnecessary).Youmayassumethattheintervals
【leetcode】56. Merge Intervals 相邻线段归并
1.题目Givenacollectionofintervals,mergealloverlappingintervals.Forexample,Given1,3,2,6,8,10,15,18,return1,6,8,10,15,18
【leetcode】55. Jump Game 数组跳转是否可以到达末节点
1.题目Givenanarrayofnonnegativeintegers,youareinitiallypositionedatthefirstindexofthearray.Eachelementinthearrayrepresent
【leetcode】54. Spiral Matrix 矩阵的螺旋圈向内顺序展开为一维
1.题目Givenamatrixofmxnelements(mrows,ncolumns),returnallelementsofthematrixinspiralorder.Forexample,Giventhefollowingm
【leetcode】53. Maximum Subarray 连续子序列的最大和
1.题目Findthecontiguoussubarraywithinanarray(containingatleastonenumber)whichhasthelargestsum.Forexample,giventhearray2,
【leetcode】52. N-Queens II N皇后问题的解法个数
1.题目FollowupforNQueensproblem.Now,insteadoutputtingboardconfigurations,returnthetotalnumberofdistinctsolutions.!图片描述(http
【leetcode】51. N-Queens 求解N皇后问题的所有解
1.题目Thenqueenspuzzleistheproblemofplacingnqueensonann×nchessboardsuchthatnotwoqueensattackeachother.!8queens.png(htt
Leetcode 17. Letter Combinations of a Phone Number
我的做法是利用迭代来代替递归本质这个是一个尾递归结构,跟数数是一个道理<pre<codepublicclassSolution{publicList<String>letterCombinations(Stringdigits){Lis
已加载文章中没有匹配内容,试试其他关键词或清空搜索。