8 风澈云间

尚未进行身份认证

暂无相关描述

等级
博文 64
排名 6w+

纵向编辑vim

ctrl+v进入VisualBlock模式,选中某几行按r键进入切换模式,输入要切换的内容按I键进入左添加模式,输入要切换的内容,输入完后ESC完成添加按A键进入右添加模式,输入要切换的内容,输入完后按ESC完成添加

2017-01-02 22:04:48

[Leetcode]220. Contains Duplicate III @python

题目Givenanarrayofintegers,findoutwhethertherearetwodistinctindicesiandjinthearraysuchthatthedifferencebetweennums[i]andnums[j]isatmosttandthedifferencebetweeniandji

2016-02-26 23:49:35

[Leetcode]214. Shortest Palindrome@python

题目GivenastringS,youareallowedtoconvertittoapalindromebyaddingcharactersinfrontofit.Findandreturntheshortestpalindromeyoucanfindbyperformingthistransformation.Forexample

2016-02-25 22:25:36

[Leetcode] 212. Word Search @python

题目Givena2Dboardandalistofwordsfromthedictionary,findallwordsintheboard.Eachwordmustbeconstructedfromlettersofsequentiallyadjacentcell,where“adjacent”cellsarethosehorizo

2016-02-25 19:59:33

[Leetcode]211. Add and Search Word - Data structure design @python

题目Designadatastructurethatsupportsthefollowingtwooperations:voidaddWord(word)boolsearch(word)search(word)cansearchaliteralwordoraregularexpressionstringcontainingonlyletters

2016-02-05 22:00:44

[Leetcode]201. Bitwise AND of Numbers Range @python

题目Givenarange[m,n]where0<=m<=n<=2147483647,returnthebitwiseANDofallnumbersinthisrange,inclusive.Forexample,giventherange[5,7],youshouldreturn4.题目要求给定m和n要求m到n的所有数字相与的结果。

2016-02-05 21:05:03

[Leetcode]188. Best Time to Buy and Sell Stock IV@python

题目Sayyouhaveanarrayforwhichtheithelementisthepriceofagivenstockondayi.Designanalgorithmtofindthemaximumprofit.Youmaycompleteatmostktransactions.Note:Youmaynotengag

2016-02-05 20:49:23

[Leetcode] 179. Largest Number @python

题目Givenalistofnonnegativeintegers,arrangethemsuchthattheyformthelargestnumber.Forexample,given[3,30,34,5,9],thelargestformednumberis9534330.Note:Theresultmaybeverylarg

2016-02-05 17:00:05

[Leetcode]174. Dungeon Game @python

题目Thedemonshadcapturedtheprincess(P)andimprisonedherinthebottom-rightcornerofadungeon.ThedungeonconsistsofMxNroomslaidoutina2Dgrid.Ourvaliantknight(K)wasinitiallypo

2016-02-05 16:25:48

[Leetcode]166. Fraction to Recurring Decimal @python

题目Giventwointegersrepresentingthenumeratoranddenominatorofafraction,returnthefractioninstringformat.Ifthefractionalpartisrepeating,enclosetherepeatingpartinparentheses.Forex

2016-02-05 15:09:37

[Leetcode]152. Maximum Product Subarray @python

题目Findthecontiguoussubarraywithinanarray(containingatleastonenumber)whichhasthelargestproduct.Forexample,giventhearray[2,3,-2,4],thecontiguoussubarray[2,3]hasthelargestpro

2016-02-05 14:30:35

[Leetcode]149. Max Points on a Line @python

题目Givennpointsona2Dplane,findthemaximumnumberofpointsthatlieonthesamestraightline.题目要求给定n个2维平面上的点,找到在同一直线上最多的点数。解题思路在同一直线上要求所有点的斜率相同且经过同一个点。同时要考虑,斜率可能为无穷大,也有可能两个点为同一个点。代码#Definition

2016-02-05 14:06:11

[Leetcode]146. LRU Cache @python

题目DesignandimplementadatastructureforLeastRecentlyUsed(LRU)cache.Itshouldsupportthefollowingoperations:getandset.get(key)-Getthevalue(willalwaysbepositive)ofthekeyifthe

2016-01-29 13:56:46

[Leetcode]142. Linked List Cycle II @python

题目Givenalinkedlist,returnthenodewherethecyclebegins.Ifthereisnocycle,returnnull.Note:Donotmodifythelinkedlist.Followup:Canyousolveitwithoutusingextraspace?题目要求给定一个链表,如果

2016-01-28 12:08:55

[Leetcode]126. Word Ladder II python

题目Giventwowords(beginWordandendWord),andadictionary’swordlist,findallshortesttransformationsequence(s)frombeginWordtoendWord,suchthat:OnlyonelettercanbechangedatatimeEach

2016-01-24 23:42:52

[Leetcode]127. Word Ladder@python

题目Giventwowords(beginWordandendWord),andadictionary’swordlist,findthelengthofshortesttransformationsequencefrombeginWordtoendWord,suchthat:Onlyonelettercanbechangedatatim

2016-01-24 22:33:15

[Leetcode]105. Construct Binary Tree from Preorder and Inorder Traversal@python

题目Givenpreorderandinordertraversalofatree,constructthebinarytree.Note:Youmayassumethatduplicatesdonotexistinthetree.题目要求给定对一个binary-tree的前序遍历和中序遍历。重建二叉树。解题思路前序遍历的第一个值为根节点的值,在中序遍历

2016-01-24 14:17:16

[Leetcode] 98. Validate Binary Search Tree @python

题目Givenabinarytree,determineifitisavalidbinarysearchtree(BST).AssumeaBSTisdefinedasfollows:Theleftsubtreeofanodecontainsonlynodeswithkeyslessthanthenode’skey.Therig

2016-01-24 13:49:55

[Leetcode]97. Interleaving String @python

题目Givens1,s2,s3,findwhethers3isformedbytheinterleavingofs1ands2.Forexample,Given:s1=“aabcc”,s2=“dbbca”,Whens3=“aadbbcbcac”,returntrue.Whens3=“aadbbbaccc”,returnfal

2016-01-24 12:40:50

[Leetcode]91. Decode Ways@python

题目AmessagecontaininglettersfromA-Zisbeingencodedtonumbersusingthefollowingmapping:‘A’->1‘B’->2…‘Z’->26Givenanencodedmessagecontainingdigits,determinethetotalnumber

2016-01-23 18:38:34
奖章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!