![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
文章平均质量分 66
zenggouzai
夜深人静之时,头发斑白的老程序员会蜷缩在床上,欣赏一段精彩的子程序,或者苦思冥想一个绝妙的宏结构;而那些年少轻狂的程序员,则可能正在通过终端与别人聊得不亦乐乎。
展开
-
leetcode难度及面试频率
1 Two Sum 2 5 array sort set Two Pointers 2 Add Two Numbers 3 4 linked list Two Pointers转载 2015-05-16 10:53:34 · 405 阅读 · 0 评论 -
leetcode第七题(easy)——Reverse Integer
题目描述如下: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 我为这道题尝试了3种解法,一开始的解法运行时间为499ms,觉得太慢了,于是在网上参考了别人的思路,的确是快了一些,但是后来觉得在刷题的时候没这必要,运行出来就行了。三种解法的思路原创 2015-05-16 21:10:57 · 453 阅读 · 0 评论 -
leetcode第一题(medium)——Two Sum
题目描述如下: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to th原创 2015-05-20 16:08:45 · 417 阅读 · 0 评论 -
leetcode第十四题(easy)——Longest Common Prefix
题目描述如下: Write a function to find the longest common prefix string amongst an array of strings. 一开始搞错了题目的意思,以为是两两字符串相比较,求出最大长度前缀,结果是所有的字符串相比,求出共同的最大长度前缀。 如何来取得两个字符串的最长前缀呢? 刚开始是通过这种方法来获得,str1.st原创 2015-05-17 10:13:27 · 398 阅读 · 0 评论