Core Idea
A lower bound query asks for the first sorted element that is at least a target value. The array is already sorted, so binary search is the natural tool.
Algorithm
Maintain a search range over indices and move left when a[mid] >= x; otherwise move right. The final position is the first valid candidate.
Common Mistakes
If every value is smaller than the target, there is no lower bound. Return the required impossible marker from the statement instead of an array position past the end.