Practice ยท 3 of 3
First >= Threshold
On an ascending array, implement int first_ge(const int *a, int n, int t) returning the index of the FIRST element >= t, or -1 if none. (Binary search variant โ linear is acceptable but halving is the habit to build.)
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Search Practice