Given a sorted array of distinct integers nums and a target, return the index of target if found; otherwise return the index where it would be inserted to keep the array sorted. Must run in O(log n).
Input
targetOutput: the index.
1 3 5 6 5
2
1 3 5 6 2
1
1 3 5 6 7
4
Run your code against the sample tests, or Submit to run the full suite.