文章
【leetcode】61. Rotate List
1.题目Givenalist,rotatethelisttotherightbykplaces,wherekisnonnegative.Forexample:Given1>2>3>4>5>NULLand
【leetcode】60. Permutation Sequence 全排列的第k位序的排列形式
1.题目Theset1,2,3,…,ncontainsatotalofn!uniquepermutations.Bylistingandlabelingallofthepermutationsinorder,Wegetthefollow
【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】50. Pow(x, n) 幂计算
1.题目Implementpow(x,n).2.思路每次翻倍,如果当前翻倍的幂次在n的二进制位内,则乘入最后结果中,否则跳过继续。特殊场景较多,要特别考虑:幂次n可能是负数,这是要注意转换为正数后,最后求导。n如果是numeric_limit
已加载文章中没有匹配内容,试试其他关键词或清空搜索。