Problem 2774 · Easy

Array Upper Bound

teaching model: binary search a sorted array for the boundary just after the target, then check the item before that boundary.

Open the interactive visualisation