1. If only one element remains in the array, solve it directly
2. Compare x with the middle element of the array
3. If x = middle element, then output it and stop
4. If x < middle element, then recursively solve the problem with x and the left half array
5. If x > middle element, then recursively solve the problem with x and the right half array