- 博客(6)
- 资源 (7)
- 收藏
- 关注
原创 LeetCode Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1
2014-08-11 22:02:59 646
原创 Leetcode Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For example, Given [0,1,0,2,1,0,1,3,2,1,2,1]
2014-08-10 16:12:04 417
原创 Leetcode(Search in Rotated Sorted Array II )
Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the
2014-08-09 21:36:39 457
原创 Leetcode (Generate Parentheses )
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()
2014-08-09 17:18:50 446
原创 Leetcode(Sort Colors )
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the integers
2014-08-09 16:44:37 556
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人