- 博客(7)
- 收藏
- 关注
原创 Leetcode Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1,2,1,−5,4],the contiguous subarray [4,−1,2,1]
2014-11-18 00:50:46 231
原创 Remove Duplicates from sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.
2014-11-18 00:38:03 185
原创 Leetcode Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.
2014-11-17 03:22:53 242
转载 Leetcode Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointer to point to its next right node.
2014-11-17 02:57:30 295
原创 Leetcode BST Inorder Traverse
Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2].Note: Recursive solutio
2014-11-16 10:35:49 542
原创 Leetcode BST Preorder Traverse
Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Recursive soluti
2014-11-16 10:32:04 433
原创 Leetcode Single Number
Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using e
2014-11-15 03:01:23 176
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人