Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration. Stan Kelly-Bootle

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.