Re: [algogeeks] k the smallest in BST without using static variable

2010-05-23 Thread Dheeraj Jain
@satwik See http://geeksforgeeks.org/?p=6358 for Morris Inorder traversal On Sat, May 15, 2010 at 9:44 PM, satwik krishna wrote: > @Rohit > Can u pass on thje link of morris inorder > > > On 5/15/10, Rohit Saraf wrote: >> >> there is something called morris inorder traversal. >> credits to don

Re: [algogeeks] k the smallest in BST without using static variable

2010-05-16 Thread kaushik sur
Thanks Rohit! On Sat, May 15, 2010 at 7:13 PM, Rohit Saraf wrote: > there is something called morris inorder traversal. > credits to donald knuth > > > On 5/15/10, kaushik sur wrote: > > Hi Friends > > > > I have encountered the question in sites - "Given a Binary Search > > Tree, write a progr

Re: [algogeeks] k the smallest in BST without using static variable

2010-05-16 Thread satwik krishna
@Rohit Can u pass on thje link of morris inorder On 5/15/10, Rohit Saraf wrote: > > there is something called morris inorder traversal. > credits to donald knuth > > > On 5/15/10, kaushik sur wrote: > > Hi Friends > > > > I have encountered the question in sites - "Given a Binary Search > > Tr

Re: [algogeeks] k the smallest in BST without using static variable

2010-05-15 Thread Rohit Saraf
there is something called morris inorder traversal. credits to donald knuth On 5/15/10, kaushik sur wrote: > Hi Friends > > I have encountered the question in sites - "Given a Binary Search > Tree, write a program to print the kth smallest element without using > any static/global variable. You

[algogeeks] k the smallest in BST without using static variable

2010-05-15 Thread kaushik sur
Hi Friends I have encountered the question in sites - "Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can't pass the value k to any function also." I have tried my hands using explicit stack for inorder and keeping a no