- You are given a number n, representing the size of array arr.
- You are given n numbers (in ascending order), representing elements of the array arr.
- You are given another number k.
- You are required to print the ceil and floor of k in array arr.
Example 1:
Input: n= 5, arr[] = {7, 14, 18, 25, 30}, k= 18
Output: 18 18
Example 2:
Input: n= 8, arr[] = {5, 10, 15, 22, 33, 40, 42, 55}, k= 25
Output: 33 22
Constraints:
1 <= n <= 1000
-10^9 <= n1, n2, .. n elements <= 10^9
-10^9 <= d <= 10^9