guneesh
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.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Move from last node to first node while constructing a bst
for each element first search it in the BST....add element to Bst..also note the last right movement(this will be the req element) and replace a[i] by that..
worst case would be o(n^2) but if we use augmented trees it wud be O(nlogn)
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
can u give any test case where it would fail!!
- guneesh December 18, 2012