5 _TCgogogo_

尚未进行身份认证

暂无相关描述

等级
博文 939
排名 888

LeetCode 127 Word Ladder (BFS)

Giventwowords(beginWordandendWord),andadictionary'swordlist,findthelengthofshortesttransformationsequencefrombeginWordtoendWord,suchthat:Onlyonelettercanbechangedatati...

2019-05-30 17:33:04

LeetCode 1014 Best Sightseeing Pair (思维 推荐)

GivenanarrayAofpositiveintegers,A[i]representsthevalueofthei-thsightseeingspot,andtwosightseeingspotsiandjhavedistancej-ibetweenthem.Thescoreofapair(i<j)ofsig...

2019-05-30 16:33:40

LeetCode 503 Next Greater Element II (数组)

Givenacirculararray(thenextelementofthelastelementisthefirstelementofthearray),printtheNextGreaterNumberforeveryelement.TheNextGreaterNumberofanumberxisthefirstgre...

2019-05-15 19:27:33

LeetCode 685 Redundant Connection II (并查集 判树)

Inthisproblem,arootedtreeisadirectedgraphsuchthat,thereisexactlyonenode(theroot)forwhichallothernodesaredescendantsofthisnode,pluseverynodehasexactlyoneparent,excep...

2019-05-14 23:51:28

LeetCode 778 Swim in Rising Water (二分 + DFS)

OnanNxNgrid,eachsquaregrid[i][j]representstheelevationatthatpoint(i,j).Nowrainstartstofall.Attimet,thedepthofthewatereverywhereist.Youcanswimfromasquaretoanother...

2019-05-14 22:56:18

Codeforces B Cat Party (思维 推荐)

B2.CatParty(HardEdition)timelimitpertest:1secondmemorylimitpertest:256megabytesThisproblemissameasthepreviousone,buthaslargerconstraints.Shiro'sjustmovedtothenew...

2019-05-13 20:04:32

LeetCode 873 Length of Longest Fibonacci Subsequence (hash 或 dp)

AsequenceX_1,X_2,...,X_nisfibonacci-likeif:n>=3 X_i+X_{i+1}=X_{i+2}foralli+2<=nGivenastrictlyincreasingarrayAofpositiveintegersformingasequence,findtheleng...

2019-05-06 20:04:50

LeetCode 740 Delete and Earn (dp)

Givenanarraynumsofintegers,youcanperformoperationsonthearray.Ineachoperation,youpickanynums[i]anddeleteittoearnnums[i]points.After,youmustdeleteeveryelementequaltonu...

2019-05-05 11:10:47

LeetCode 1025 Divisor Game (博弈)

AliceandBobtaketurnsplayingagame,withAlicestartingfirst.Initially,thereisanumberNonthechalkboard.Oneachplayer'sturn,thatplayermakesamoveconsistingof:Choosinganyxw...

2019-05-05 11:01:52

LeetCode 63 Unique Paths II (dp)

Arobotislocatedatthetop-leftcornerofamxngrid(marked'Start'inthediagrambelow).Therobotcanonlymoveeitherdownorrightatanypointintime.Therobotistryingtoreachthebo...

2019-05-05 10:51:19

LeetCode 91 Decode Ways (dp)

AmessagecontaininglettersfromA-Zisbeingencodedtonumbersusingthefollowingmapping:'A'->1'B'->2...'Z'->26Givenanon-emptystringcontainingonlydigits,determinet...

2019-05-05 10:29:52

LeetCode 442 Find All Duplicates in an Array (思维)

Givenanarrayofintegers,1≤a[i]≤n(n=sizeofarray),someelementsappeartwiceandothersappearonce.Findalltheelementsthatappeartwiceinthisarray.Couldyoudoitwithoutextra...

2019-05-02 11:49:57

Codeforces 607B Zuma (区间dp)

B.Zumatimelimitpertest:2secondsmemorylimitpertest:512megabytesGenosrecentlyinstalledthegameZumaonhisphone.InZumathereexistsalineofngemstones,thei-thofwhichhascolo...

2019-05-02 11:25:10

LeetCode 650 2 Keys Keyboard (dp 推荐)

Initiallyonanotepadonlyonecharacter'A'ispresent.Youcanperformtwooperationsonthisnotepadforeachstep:CopyAll:Youcancopyallthecharacterspresentonthenotepad(partialcopy...

2019-04-29 02:24:49

LeetCode 114 Flatten Binary Tree to Linked List (DFS 分治)

Givenabinarytree,flattenittoalinkedlistin-place.Forexample,giventhefollowingtree:1/\25/\\346Theflattenedtreeshouldlooklike:1\2\...

2019-04-28 23:04:50

LeetCode 554 Brick Wall (前缀和)

Thereisabrickwallinfrontofyou.Thewallisrectangularandhasseveralrowsofbricks.Thebrickshavethesameheightbutdifferentwidth.Youwanttodrawaverticallinefromthetoptothe...

2019-04-28 22:00:33

LeetCode 230 Kth Smallest Element in a BST (中序遍历)

Givenabinarysearchtree,writeafunctionkthSmallesttofindthekthsmallestelementinit.Note:Youmayassumekisalwaysvalid,1≤k≤BST'stotalelements.Example1:Input:root=[3,...

2019-04-28 13:18:51

LeetCode 552 Student Attendance Record II (dp)

Givenapositiveintegern,returnthenumberofallpossibleattendancerecordswithlengthn,whichwillberegardedasrewardable.Theanswermaybeverylarge,returnitaftermod109+7.Astud...

2019-04-27 22:47:44

LeetCode 739 Daily Temperatures (思维)

GivenalistofdailytemperaturesT,returnalistsuchthat,foreachdayintheinput,tellsyouhowmanydaysyouwouldhavetowaituntilawarmertemperature.Ifthereisnofuturedayforwhich...

2019-04-27 15:16:31

LeetCode 20 Valid Parentheses (栈)

Givenastringcontainingjustthecharacters'(',')','{','}','['and']',determineiftheinputstringisvalid.Aninputstringisvalidif:Openbracketsmustbeclosedbythesametypeofb...

2019-04-27 14:52:59
奖章
  • 专栏达人
    专栏达人
    授予成功创建个人博客专栏的用户。专栏中添加五篇以上博文即可点亮!撰写博客专栏浓缩技术精华,专栏达人就是你!
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv1
    勤写标兵Lv1
    授予每个自然周发布1篇到3篇原创IT博文的用户。本勋章将于次周上午根据用户上周的博文发布情况由系统自动颁发。
  • 勤写标兵Lv2
    勤写标兵Lv2
    授予每个自然周发布4篇到6篇原创IT博文的用户。本勋章将于次周上午根据用户上周的博文发布情况由系统自动颁发。
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周上午根据用户上周的博文发布情况由系统自动颁发。