Its hard enough to find an error in your code when you are looking for it; its even harder when you ve assumed your code is error-free. Steve McConnell

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.