Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. Brian W. Kernighan

Find k-th smallest element

Language Java | Level Intermediate | Category Data structure | September 6, 2015 8:00 am


Data structure Description

Write a program to find the k-th item from given Binary search tree. If Binary search tree contains and passes 4 items, the utility function returns 4th item data.


Output

   					 

Items form Binary Search Tree: 4  5  6  12  
The 4th item form Binary Search Tree: 12

				    

Comments


No comments available!

Please login to add comments.