Given a sorted ascending array `nums`, implement `search(nums, target)` returning the index of `target`, or `-1` if absent.
Run your code to see results.