摘要: 题目:Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red,... 阅读全文
posted @ 2014-11-04 04:54 StevenCooks 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 题目:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target valu... 阅读全文
posted @ 2014-11-02 23:32 StevenCooks 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 我在Github上新建了一个解答Leetcode问题的Project,大家可以参考, 目前是Java 为主,里面有leetcode上的题目,解答,还有一些基本的单元测试,方便大家起步。题目:Given an array of integers, find two numbers such that ... 阅读全文
posted @ 2014-11-02 00:02 StevenCooks 阅读(2764) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters... 阅读全文
posted @ 2014-11-01 22:44 StevenCooks 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 题目:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints ... 阅读全文
posted @ 2014-10-30 05:17 StevenCooks 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 我在Github上新建了一个解答Leetcode问题的Project,大家可以参考, 目前是Java 为主,里面有leetcode上的题目,解答,还有一些基本的单元测试,方便大家起步。题目:Suppose a sorted array is rotated at some pivot unknown... 阅读全文
posted @ 2014-10-30 03:03 StevenCooks 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 我在Github上新建了一个解答Leetcode问题的Project,大家可以参考, 目前是Java 为主,里面有leetcode上的题目,解答,还有一些基本的单元测试,方便大家起步。题目:Given two sorted integer arrays A and B, merge B into A... 阅读全文
posted @ 2014-10-25 23:45 StevenCooks 阅读(806) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't ... 阅读全文
posted @ 2014-10-25 22:35 StevenCooks 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space fo... 阅读全文
posted @ 2014-10-25 22:19 StevenCooks 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is... 阅读全文
posted @ 2014-10-25 22:05 StevenCooks 阅读(139) 评论(0) 推荐(0) 编辑