Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. Alan Kay

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.