Array
文章平均质量分 54
boegkpmlkvebevwa
这个作者很懒,什么都没留下…
展开
-
[LeetCode] Best Time to Buy and Sell Stock II
Total Accepted: 12408 Total Submissions: 34893原创 2014-04-30 10:10:56 · 359 阅读 · 0 评论 -
[LeetCoed] Longest Consecutive Sequence
Longest Consecutive Sequence Total Accepted: 17029 Total Submissions: 61041My Submissions Given an unsorted array of integers, find the length of the longest consecutive elements sequence原创 2014-08-15 12:18:50 · 367 阅读 · 0 评论 -
[LeetCode] Valid Sudoku
Valid Sudoku Total Accepted: 12421 Total Submissions: 44620原创 2014-08-26 03:57:03 · 365 阅读 · 0 评论 -
[LeetCode] Search in Rotated Sorted Array II
Search in Rotated Sorted Array II Total Accepted: 14625 Total Submissions: 47745 Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-原创 2014-08-25 23:44:09 · 342 阅读 · 0 评论 -
[LeetCode] Subsets
Total Accepted: 10972 Total Submissions: 40240原创 2014-04-19 21:27:59 · 1042 阅读 · 0 评论 -
[LeetCode] Search in Rotated Sorted Array
Total Accepted: 11464 Total Submissions: 40857原创 2014-04-08 18:00:46 · 353 阅读 · 0 评论 -
[LeetCode] Pascal's Triangle II
Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorithm to use only O(k) extra space?原创 2014-04-08 16:00:14 · 414 阅读 · 0 评论 -
[LeetCode] Pascal's Triangle
Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ]原创 2014-04-08 15:59:17 · 365 阅读 · 0 评论 -
[LeetCode] Remove Duplicates from Sorted Array II
Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted array A = [1,1,1,2,2,3], Your function should return length = 5, and A is now [1,1,2,2,原创 2014-04-08 15:18:25 · 394 阅读 · 0 评论 -
[LeetCode] Plus One
Total Accepted: 9100 Total Submissions: 29949 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 at原创 2014-04-08 16:17:36 · 318 阅读 · 0 评论 -
[LeetCode] Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with c原创 2014-04-08 15:19:40 · 322 阅读 · 0 评论 -
[LeetCode] Triangle
Total Accepted: 8954 Total Submissions: 33737 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the foll原创 2014-04-21 12:36:39 · 406 阅读 · 0 评论 -
[LeetCode] Merge Sorted Array
Total Accepted: 11913 Total Submissions: 37576 Given 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 is greater or equ原创 2014-04-21 10:17:23 · 439 阅读 · 0 评论 -
[LeetCode] Best Time to Buy and Sell Stock
Total Accepted: 12576 Total Submissions: 41038 Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one tran原创 2014-04-30 09:52:57 · 513 阅读 · 0 评论 -
[LeetCode] Valid Sudoku Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of原创 2014-09-02 13:13:12 · 326 阅读 · 0 评论