Chen.Yangho
BAN USER
Comments (5)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
How if it is not a binary tree, especially not a rooted tree?
- Chen.Yangho October 24, 2011Comment hidden because of low score. Click to expand.
0
of 0 vote
The order is reveresed
- Chen.Yangho October 24, 2011Comment hidden because of low score. Click to expand.
0
of 0 vote
The subarray is not a subset of the array. There are only c(n,2) sub-arrays (polynomial number) but 2^n subsets.
- Chen.Yangho October 23, 2011Comment hidden because of low score. Click to expand.
0
of 0 vote
As above comment, the part starting at arbitrary node and find the length is not clear. I will do BFS from a leaf. During the traversal, I will keep the records of the longest and the second longest distance to the leaves and the corresponding edges (direction) for every "branch node" (Node with degree > 2).
- Chen.Yangho October 19, 2011Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Your answer cannot apply to 24 != 1/4 * 2 ^ 2 = 32
- Chen.Yangho May 29, 2012