Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can we use binary search to find the minimum value of a non-contiguous subsequence of a given size k?
Initialize the search range with the minimum and maximum elements of the input array.
Use a check function to determine if it is possible to select k non-consecutive elements that are less than or equal to the current "guess" value.
Adjust the search range based on the outcome of the check function, until the range converges and the minimum value is found.