Good programmers use their brains, but good guidelines save us having to think out every case. Francis Glassborow

Floor and Ceil from a BST

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


Data structure Description

Floor Function is the greatest integer that is less than or equal to given the number. Ceiling Function is the least integer that is greater than or equal to given number.

Write a program to find ceil and floor values in given binary search tree.


Output

   					 

All Binary Tree Values: 1 2 3 4  
Ceiling in the Binary Tree Value: 4
Floor in the Binary Tree Value: 3

				    

Comments


No comments available!

Please login to add comments.