First Element Strictly Greater Than k in a Sorted Array
Given a sorted (ascending) integer array and an integer k, find the first element that is strictly greater than k. If none exists, output None.
Input: first line n and k; second line n sorted i...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
