6 蝌蚪123456

尚未进行身份认证

暂无相关描述

等级
TA的排名 1w+

191.Fizz Buzz

题目Writeaprogramthatoutputsthestringrepresentationofnumbersfrom1ton.Butformultiplesofthreeitshouldoutput“Fizz”insteadofthenumberandforthemultiplesoffiveoutput“Buzz”....

2019-05-07 21:18:22

190.Largest Perimeter Triangle

题目GivenanarrayAofpositivelengths,returnthelargestperimeterofatrianglewithnon-zeroarea,formedfrom3oftheselengths.Ifitisimpossibletoformanytriangleofnon-zeroarea,retur...

2019-04-27 20:05:05

189.Leaf-Similar Trees

题目Consideralltheleavesofabinarytree.Fromlefttorightorder,thevaluesofthoseleavesformaleafvaluesequence.Forexample,inthegiventreeabove,theleafvaluesequenceis(6,7,...

2019-04-27 19:40:29

188.Range Sum of BST

题目Giventherootnodeofabinarysearchtree,returnthesumofvaluesofallnodeswithvaluebetweenLandR(inclusive).Thebinarysearchtreeisguaranteedtohaveuniquevalues.Example1:Inp...

2019-04-26 22:42:17

187.Base 7

题目Givenaninteger,returnitsbase7stringrepresentation.Example1:Input:100Output:“202”Example2:Input:-7Output:“-10”Note:Theinputwillbeinrangeof[-1e7,1e7].链接https://leetcod...

2019-04-26 22:13:53

186.Add Strings

题目Giventwonon-negativeintegersnum1andnum2representedasstring,returnthesumofnum1andnum2.Note:Thelengthofbothnum1andnum2is<5100.Bothnum1andnum2containsonlydigits0-...

2019-04-24 20:37:15

185.1-bit and 2-bit Characters

题目Wehavetwospecialcharacters.Thefirstcharactercanberepresentedbyonebit0.Thesecondcharactercanberepresentedbytwobits(10or11).Nowgivenastringrepresentedbyseveralbits....

2019-04-24 10:43:20

184. Divisor Game

题目AliceandBobtaketurnsplayingagame,withAlicestartingfirst.Initially,thereisanumberNonthechalkboard.Oneachplayer’sturn,thatplayermakesamoveconsistingof:Choosinganyx...

2019-04-23 21:41:20

183.Univalued Binary Tree

题目Abinarytreeisunivaluedifeverynodeinthetreehasthesamevalue.Returntrueifandonlyifthegiventreeisunivalued.Example1:Input:[1,1,1,1,1,null,1]Output:trueExample2:Input:...

2019-04-23 13:29:55

182.Smallest Range II

参考https://blog.csdn.net/zjucor/article/details/82820938题目GivenanarrayAofintegers,foreachintegerA[i]weneedtochooseeitherx=-Korx=K,andaddxtoA[i](onlyonce).Afterthisproce...

2019-04-22 22:52:27

181.Smallest Range I

题目GivenanarrayAofintegers,foreachintegerA[i]wemaychooseanyxwith-K<=x<=K,andaddxtoA[i].Afterthisprocess,wehavesomearrayB.Returnthesmallestpossibledifference...

2019-04-21 17:13:31

180.To Lower Case

题目ImplementfunctionToLowerCase()thathasastringparameterstr,andreturnsthesamestringinlowercase.Example1:Input:“Hello”Output:“hello”Example2:Input:“here”Output:“here”Example...

2019-04-21 16:48:36

179.Fibonacci Number

题目TheFibonaccinumbers,commonlydenotedF(n)formasequence,calledtheFibonaccisequence,suchthateachnumberisthesumofthetwoprecedingones,startingfrom0and1.Thatis,F(0)=0,...

2019-04-21 16:30:26

C++编译时出现 reference to local variable

具体见:https://stackoverflow.com/questions/19371137/c-reference-to-local-variable-returned会引发问题的实现如下:vector<int>&find1(string&search_word){vector<int>final;final.push_...

2018-11-09 15:59:09

atomic cas

2018-05-09 14:15:18

178.Custom Sort String

题目SandTarestringscomposedoflowercaseletters.InS,noletteroccursmorethanonce.Swassortedinsomecustomorderpreviously.WewanttopermutethecharactersofTsothattheymatcht...

2018-03-19 20:02:53

177.Merge Two Binary Trees

题目Giventwobinarytreesandimaginethatwhenyouputoneofthemtocovertheother,somenodesofthetwotreesareoverlappedwhiletheothersarenot.Youneedtomergethemintoanewbinary...

2018-03-19 19:35:49

176.Judge Route Circle

题目Initially,thereisaRobotatposition(0,0).Givenasequenceofitsmoves,judgeifthisrobotmakesacircle,whichmeansitmovesbacktotheoriginalplace.Themovesequenceisrepresente...

2018-03-14 21:33:10

java、C++、python三种语言对比之类 class

需求实现一个简单的Student类,属性nameage方法默认构造函数带参数的构造函数两个属性的get和set方法测试,实现main方法测试Student类中的方法都可以用java定义一个ClasspublicclassStudent{privateStringname;privateintage;pub...

2018-03-14 19:13:23

175.Maximum Binary Tree

题目Givenanintegerarraywithnoduplicates.Amaximumtreebuildingonthisarrayisdefinedasfollow:Therootisthemaximumnumberinthearray.Theleftsubtreeisthemaximumtreeconstruct...

2018-03-14 18:28:31

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。