文章
leetcode 475. Heaters
DescriptionGivenapositiveinteger,outputitscomplementnumber.Thecomplementstrategyistoflipthebitsofitsbinaryrepresentation.No
算法学习——DP篇
20170904开端今天工作任务比较轻,工作之余想要重新学习算法。于是准备从DP开始,进行一次学习。所有的概念和问题从leetcode(https://link.segmentfault.com/?encJn%2FU3Jj0Vvd%2BXvtJAw0Mxg%3D%3D.jEdHG
用JS写计数排序、基数排序
计数排序计数排序就是简单的桶排序,一个桶代表数组中一个数出现的个数,所以需要一个和数组数字范围一样大的辅助数组,一般用在范围小于100的排序,时间复杂度为O(n),空间复杂度为数组的数字范围。<pre<code/范围在startend之间的排序计数
用JS写KPM算法
最近公司启动小程序项目中,在搜索模块有这么个功能需求:当用户输入搜索内容时实时地请求服务器得到一组较高匹配度的搜索关键字,在这些关键字中高亮显示用户的匹配输入。例如输入“中国”搜索关键字为“<code中国</code共产党”那我就想到了KPM算法,就打开《大话数据结构》这本书来看看KPM
leetcode 437. Path Sum III | 递归!!
DescriptionYouaregivenabinarytreeinwhicheachnodecontainsanintegervalue.Findthenumberofpathsthatsumtoagivenvalue.Thep
leetcode 415. Add Strings | 大数加法
DescriptionGiventwononnegativeintegersnum1andnum2representedasstring,returnthesumofnum1andnum2.Note:Thelengthofbothnum1
leetcode 414. Third Maximum Number | set
DescriptionGivenanonemptyarrayofintegers,returnthethirdmaximumnumberinthisarray.Ifitdoesnotexist,returnthemaximumnumber.
leetcode 409. Longest Palindrome
DescriptionGivenastringwhichconsistsoflowercaseoruppercaseletters,findthelengthofthelongestpalindromesthatcanbebuiltwithth
leetcode 401. Binary Watch
DescriptionAbinarywatchhas4LEDsonthetopwhichrepresentthehours(011),andthe6LEDsonthebottomrepresenttheminutes(059).Ea
leetcode 400. Nth Digit
<blockquote<p<strong前记</strong<br/不得不说自己还欠缺很多,这道easy的leetcode原题就在今年阿里笔试编程题(第二题)出现了,当时没有AC,做题不够实在伤感...</p</blockquoteDescriptionFind
已加载文章中没有匹配内容,试试其他关键词或清空搜索。