Insert a number into its correct position in a sorted list using binary search.
Constraints
Example
>>> insert_sorted([1, 2, 4], 3) [1, 2, 3, 4] >>> insert_sorted([1, 2, 4], 0) [0, 1, 2, 4] >>> insert_sorted([1, 2, 4], 5) [1, 2, 4, 5] >>> insert_sorted([], 3) [3]
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints