文章
39. Combination Sum
Givenasetofcandidatenumbers(candidates)(withoutduplicates)andatargetnumber(target),findalluniquecombinationsincandidateswherethe
48. Rotate Image
Youaregivenannxn2Dmatrixrepresentinganimage.Rotatetheimageby90degrees(clockwise).Note:Youhavetorotatetheimageinplace,whichme
49. Group Anagrams
Givenanarrayofstrings,groupanagramstogether.Example:<pre<codeInput:&34;eat&34;,&34;tea&34;,&34;tan&34;,&34;ate&34;,&34;nat&
33. Search in Rotated Sorted Array
Supposeanarraysortedinascendingorderisrotatedatsomepivotunknowntoyoubeforehand.(i.e.,0,1,2,4,5,6,7mightbecome4,5,6,7,0,1,2).Y
34. Find First and Last Position of Element in Sorted Array
Givenanarrayofintegersnumssortedinascendingorder,findthestartingandendingpositionofagiventargetvalue.Youralgorithm&39;sruntime
31. Next Permutation
Implementnextpermutation,whichrearrangesnumbersintothelexicographicallynextgreaterpermutationofnumbers.Ifsucharrangementisnotpossibl
24. Swap Nodes in Pairs
Givenalinkedlist,swapeverytwoadjacentnodesandreturnitshead.Youmaynotmodifythevaluesinthelist&39;snodes,onlynodesitselfmaybe
22. Generate Parentheses
Givennpairsofparentheses,writeafunctiontogenerateallcombinationsofwellformedparentheses.Forexample,givenn3,asolutionsetis:
19. Remove Nth Node From End of List
Givenalinkedlist,removethenthnodefromtheendoflistandreturnitshead.<pre<codeExample:Givenlinkedlist:1>2>3>4>5
18. 4Sum
Givenanarraynumsofnintegersandanintegertarget,arethereelementsa,b,c,anddinnumssuchthatabcdtarget?Findalluniqueq
已加载文章中没有匹配内容,试试其他关键词或清空搜索。