文章
leetcode16 3Sum Closest
题外话鉴于这一题的核心思路和leetcode15的思路相同,可以先写一下15题并参考一下我之前的一篇博客(https://segmentfault.com/a/1190000008995599)题目要求GivenanarraySofnintegers,
leetcode53 Maximum Subarray 最大连续子数组
题目要求<pre<codeFindthecontiguoussubarraywithinanarray(containingatleastonenumber)whichhasthelargestsum.Forexample,giventhe
leetcode21 Merge Two Sorted Lists 将两个有序链表组合成一个新的有序链表
题目要求<pre<codeMergetwosortedlinkedlistsandreturnitasanewlist.Thenewlistshouldbemadebysplicingtogetherthenodesofthefir
leetcode19 Remove Nth Node From End of List 从链表中移除倒数第n个节点
题目要求<pre<codeGivenalinkedlist,removethenthnodefromtheendoflistandreturnitshead.Forexample,Givenlinkedlist:1>2
leetcode15 3Sum 从数组中找到三个整数,它们的和为0
题目要求<pre<codeGivenanarraySofnintegers,arethereelementsa,b,cinSsuchthatabc0?Findalluniquetripletsinthearrayw
Leetcode解题报告:Next Permutation
题目Implementnextpermutation,whichrearrangesnumbersintothelexicographicallynextgreaterpermutationofnumbers.Ifsucharrangementisn
leetcode38 count and say 数数游戏
题目要求<pre<codeThecountandsaysequenceisthesequenceofintegersbeginningasfollows:1,11,21,1211,111221,...1isreadoffas&34
leetcode5 Longest Palindromic Substring 最长且为回数的子字符串
题目要求Givenastrings,findthelongestpalindromicsubstringins.Youmayassumethatthemaximumlengthofsis1000.Example:<pre<codeI
Leetcode 21 Merge Two Sorted Lists
题目详情<blockquoteMergetwosortedlinkedlistsandreturnitasanewlist.Thenewlistshouldbemadebysplicingtogetherthenodesofthefi
Leetcode解题报告:Remove Element
题目Givenanarrayandavalue,removeallinstancesofthatvalueinplaceandreturnthenewlength.Donotallocateextraspaceforanotherar
已加载文章中没有匹配内容,试试其他关键词或清空搜索。