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 sathi...@gmail.com wrote: @Rohit Can u pass on thje link of morris inorder On 5/15/10, Rohit Saraf rohit.kumar.sa...@gmail.com wrote: there is something called morris

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 rohit.kumar.sa...@gmail.com wrote: there is something called morris inorder traversal. credits to donald knuth On 5/15/10, kaushik sur kaushik@gmail.com wrote: Hi Friends I have encountered the question in

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 rohit.kumar.sa...@gmail.comwrote: there is something called morris inorder traversal. credits to donald knuth On 5/15/10, kaushik sur kaushik@gmail.com wrote: Hi Friends I have encountered the question in sites - Given a

[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

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 kaushik@gmail.com 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