you can't implement in O(log n). It can be done in O(log n) in case of
Ranked BS Tree.


-- 
Amitesh



On Sun, Jan 20, 2013 at 6:23 PM, Praveen <praveensonare...@gmail.com> wrote:

> If for all the nodes in BST we also store the size of subtree, then it is
> possible to find nth smallest element in O(logN).
>
> On Sun, Jan 20, 2013 at 4:57 PM, Guneesh Paul Singh 
> <gunees...@gmail.com>wrote:
>
>> not possible unless u use augmented bst..which itself takes o(n) to built
>>
>> --
>>
>>
>>
>
>
>
> --
> Praveen Sonare
> +91-7838908235
>
>
>
> --
>
>
>

-- 


Reply via email to