Here, we will be searching the floor and ceil of an element from an array. A ceil is the one that is the closest greater number from the array for the element. A floor is the one that is the closest lesser numbe
A simple solution would be to run a linear search on the array and find the largest integer in the array less than or equal toxand the smallest integer in the array greater than or equal tox. That would be the floor and ceil of the numberx, respectively. The problem with this approach...