2015年6月11日
摘要: Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa... 阅读全文
posted @ 2015-06-11 22:54 gone~with~wind 阅读(114) 评论(0) 推荐(0) 编辑
摘要: There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should... 阅读全文
posted @ 2015-06-11 21:06 gone~with~wind 阅读(159) 评论(0) 推荐(0) 编辑
  2015年6月10日
摘要: Suppose that a website contains two tables, theCustomerstable and theOrderstable. Write a SQL query to find all customers who never order anything.Tab... 阅读全文
posted @ 2015-06-10 17:54 gone~with~wind 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Write a SQL query to find all numbers that appear at least three times consecutively.+----+-----+| Id | Num |+----+-----+| 1 | 1 || 2 | 1 || 3 ... 阅读全文
posted @ 2015-06-10 17:31 gone~with~wind 阅读(326) 评论(0) 推荐(0) 编辑
摘要: Table:Person+-------------+---------+| Column Name | Type |+-------------+---------+| PersonId | int || FirstName | varchar || LastName ... 阅读全文
posted @ 2015-06-10 17:17 gone~with~wind 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially... 阅读全文
posted @ 2015-06-10 16:42 gone~with~wind 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru... 阅读全文
posted @ 2015-06-10 15:15 gone~with~wind 阅读(130) 评论(0) 推荐(0) 编辑
  2015年6月9日
摘要: 转自:blog.csdn.com/whuslei排序算法经过了很长时间的演变,产生了很多种不同的方法。对于初学者来说,对它们进行整理便于理解记忆显得很重要。每种算法都有它特定的使用场合,很难通用。因此,我们很有必要对所有常见的排序算法进行归纳。 我不喜欢死记硬背,我更偏向于弄清来龙去脉,理解性地记忆... 阅读全文
posted @ 2015-06-09 08:57 gone~with~wind 阅读(203) 评论(0) 推荐(0) 编辑
  2015年6月8日
摘要: 注:此分类仅供大概参考,没有精雕细琢。有不同意见欢迎评论~利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.leetcode.com/problems/longest-valid-paren... 阅读全文
posted @ 2015-06-08 00:58 gone~with~wind 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C prog... 阅读全文
posted @ 2015-06-08 00:51 gone~with~wind 阅读(108) 评论(0) 推荐(0) 编辑