In: Computer Science
Use C Programming -
Given an array of integers and a number K, find the smallest element in array greater than or equal to K. If such element exists in the array, display it otherwise display "-1".
Example:
Input:
8
1 3 4 7 8 9 9 10
5
where:
Output:
7
Explanation: Smallest integer in the array greater than or equal to K=5 is 7.