随笔分类 -  leetcode

204 Count Primes
摘要:Description:Count the number of prime numbers less than a non-negative number,n.Credits:Special thanks to@mithmattfor adding this problem and creatin... 阅读全文

posted @ 2015-08-04 23:40 Wrench 阅读(227) 评论(0) 推荐(0)

228 Summary Range
摘要://额外声明:我发现不必把做的每一道题都在博客里更新,今后将更新我认为比较有意思的题目Descroption:Given a sorted integer array without duplicates, return the summary of its ranges.For example, ... 阅读全文

posted @ 2015-08-03 23:47 Wrench 阅读(175) 评论(0) 推荐(0)

235 Lowest Common Ancestor of a Binary Search Tree
摘要:Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to thedefinition of LCA on Wikipedia... 阅读全文

posted @ 2015-08-02 16:59 Wrench 阅读(198) 评论(0) 推荐(0)

242 Valid Anagram
摘要:Description:Given two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t= ... 阅读全文

posted @ 2015-08-02 13:48 Wrench 阅读(145) 评论(0) 推荐(0)

leetcode记录说明
摘要:leetcode是一个在线算法测试网站,上面有很多经典的算法题目,经常会在程序员面试中出现。 作为一个初级coder,这些题目对我的提升还是很大的。我准备做完上面的题目后,记录在这里,也算是挺有意思的一件事。 目前已经做过了42道题,这些我有的代码已经丢失,等最终全部做完有时间再重新做。 ... 阅读全文

posted @ 2015-08-02 13:45 Wrench 阅读(148) 评论(0) 推荐(0)

导航