摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw... 阅读全文
posted @ 2014-04-25 22:36 一弦一仙 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l... 阅读全文
posted @ 2014-04-25 21:35 一弦一仙 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Merge Sorted ArrayGiven two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that i... 阅读全文
posted @ 2014-04-25 21:14 一弦一仙 阅读(127) 评论(0) 推荐(0) 编辑
摘要: http://oj.leetcode.com/problems/search-for-a-range/使用快速排序的原理进行查找public class Solution { public int[] searchRange(int[] A, int target) { in... 阅读全文
posted @ 2014-04-25 20:28 一弦一仙 阅读(91) 评论(0) 推荐(0) 编辑