Further if there are parent pointers defined in the BST, I think the
approach takes O(1) space because, we greedily traverse the tree with 2
pointers.
(Of course the space needed for tree is excluded).
On Sat, Mar 9, 2013 at 9:46 AM, marti wrote:
> Thank you!!! Sir.
>
>
> On Tuesday, March 5, 2
awesome approach :) (y)
On Sat, Mar 9, 2013 at 9:46 AM, marti wrote:
> Thank you!!! Sir.
>
>
> On Tuesday, March 5, 2013 1:24:30 PM UTC+5:30, marti wrote:
>>
>> Given a value , print two nodes that sum to the value in a BST and normal
>> tree.. time:O(n), space O(logn).
>>
> --
> You received
Thank you!!! Sir.
On Tuesday, March 5, 2013 1:24:30 PM UTC+5:30, marti wrote:
>
> Given a value , print two nodes that sum to the value in a BST and normal
> tree.. time:O(n), space O(logn).
>
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group
Please register my email and let me receive threads from Algogeeks.
--
Regards,
Madhura Oak
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to algogeeks+unsubs