文章
【leetcode】22. Generate Parentheses 合法括号串的所有组合
1.题目Givennpairsofparentheses,writeafunctiontogenerateallcombinationsofwellformedparentheses.Forexample,givenn3,asoluti
【leetcode】21. Merge Two Sorted Lists 两个有序链表的归并有序
1.题目Mergetwosortedlinkedlistsandreturnitasanewlist.Thenewlistshouldbemadebysplicingtogetherthenodesofthefirsttwolist
【leetcode】20. Valid Parentheses 括号串的合法判断
1.题目Givenastringcontainingjustthecharacters&39;(&39;,&39;)&39;,&39;{&39;,&39;}&39;,&39;&39;and&39;&39;,determineif
【leetcode】19. Remove Nth Node From End of List 删除链表的倒数第N个元素
1.题目Givenalinkedlist,removethenthnodefromtheendoflistandreturnitshead.Forexample,Givenlinkedlist:1>2>3>4&g
【Leetcode】18. 4Sum 给定数组中的4个元素之和等于给定值的所有组合
1.题目GivenanarraySofnintegers,arethereelementsa,b,c,anddinSsuchthatabcdtarget?Findalluniquequadrupletsinthe
【Leetcode】17. Letter Combinations of a Phone Number 九键的数字串转字母串
1.题目Givenadigitstring,returnallpossiblelettercombinationsthatthenumbercouldrepresent.Amappingofdigittoletters(justlikeon
【Leetcode】16. 3Sum Closest 集合中选三个元素之和最接近指定值
1.题目GivenanarraySofnintegers,findthreeintegersinSsuchthatthesumisclosesttoagivennumber,target.Returnthesumofthethre
【Leetcode】15. 3Sum 集合中选三个元素之和等于0
1.题目GivenanarraySofnintegers,arethereelementsa,b,cinSsuchthatabc0?Findalluniquetripletsinthearraywhichgives
【Leetcode】14. Longest Common Prefix 两个字符串的最长公共前缀长度
1.题目Writeafunctiontofindthelongestcommonprefixstringamongstanarrayofstrings.2.思路遍历按序逐个比较,直接了当。3.代码耗时:6ms<p
【Leetcode】13. Roman to Integer 罗马数字转阿拉伯数字
1.题目Givenaromannumeral,convertittoaninteger.Inputisguaranteedtobewithintherangefrom1to3999.2.思路按序累加即可。考虑{4、9}10
已加载文章中没有匹配内容,试试其他关键词或清空搜索。