水中的鱼

Saturday, March 23, 2013

[LeetCode] Path Sum, Solution

›
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the ...
Friday, March 22, 2013

[Interview] Serialize and De-serialize a tree

›
A very frequent interview question. Suppose you have a tree, how could you serialize it to file and revert it back? for example,       ...

[LeetCode] Convert Sorted Array to Binary Search Tree, Solution

›
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. » Solve this problem [Thoughts] If w...
Thursday, March 21, 2013

[LeetCode] Same Tree, Solution

›
Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structural...
Wednesday, March 20, 2013

[LeetCode] Unique Binary Search Trees II, Solution

›
Given  n , generate all structurally unique  BST's  (binary search trees) that store values 1... n . For example, Given  n  = 3, yo...

[LeetCode] Unique Binary Search Trees, Solution

›
Given  n , how many structurally unique  BST's  (binary search trees) that store values 1... n ? For example, Given  n  = 3, there ...
Monday, March 18, 2013

[LeetCode] Remove Duplicates from Sorted List II, Solution

›
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only  distinct  numbers from the original list. For ex...
‹
›
Home
View web version

About Me

codingtmd
View my complete profile
Powered by Blogger.