文章
【LeetCode】617. Merge Two Binary Trees
题目描述Giventwobinarytreesandimaginethatwhenyouputoneofthemtocovertheother,somenodesofthetwotreesareoverlappedwhiletheot
javascript初探LeetCode之9.Palindrome Number
题目<blockquote<pDeterminewhetheranintegerisapalindrome.Dothiswithoutextraspace.</p</blockquote分析这是leetcode上的第9题,难度为e
【LeetCode】657. Judge Route Circle
题目描述Initially,thereisaRobotatposition(0,0).Givenasequenceofitsmoves,judgeifthisrobotmakesacircle,whichmeansitmovesback
【LeetCode】461. Hamming Distance
题目描述TheHammingdistancebetweentwointegersisthenumberofpositionsatwhichthecorrespondingbitsaredifferent.Giventwointegers<cod
算法题解:从字符串中查找最长的回文子串(搜索最佳结果的一般方法)
题目分析题目链接:5.LongestPalindromicSubstring(https://link.segmentfault.com/?encY4YbZP15FcMkrGRCp7kV9w%3D%3D.GVLW2zKHSmSm3GF124AQD54mT20B%2Bfhc%2
算法题解:用DFS(递归)寻找树中的最大权值路径
题目分析题目链接:124.BinaryTreeMaximumPathSum(https://link.segmentfault.com/?enc9GjBVgfqVlryTxV9ipUQfA%3D%3D.ymNQDuApmCy7Fg%2BzRoXJu1YGsFFFRGP77
leetcode刷题笔记(3)(python)
485MaxConsecutiveOnes题意:给出一串二进制数组,求数组中最长的连续1的个数思路:遍历数组判断,然后将值添加到长度保存数组中,取保存数组最大值。本题要考虑输入的数组为0,1的状况。代码:classSolution(object):<pre<codedef
leetcode刷题笔记(2)(python)
344ReverseString题意:给出一个字符串对字符串进行翻转(reverse)思路:直接使用切片函数进行翻转(网上看到的,具体怎么使用有点迷)::1代码:classSolution(object):<pre<codedefreverseString(s
leetcode刷题笔记(1)(python)
最近时间准备面试,开始在leetcode上刷题了。于是在segmentfault上写点东西来记录下。可能会有各种弱智情况,望指出。ArrayPartitionI题意:这个题目看原题实在没有看懂,在网上找的翻译,大致意思是给你一个长度为2n的数组,讲数组分为长度为2的子数组,
算法题解:从输入string中找出无重复字符的最长子串
题目分析题目链接:leetcode:LongestSubstringWithoutRepeatingCharacters(https://link.segmentfault.com/?encmw70Yrr4X7DTsuk59kCyUA%3D%3D.x3OprHjo5%2
已加载文章中没有匹配内容,试试其他关键词或清空搜索。