Statement
Write searchInsert(sorted, target): sorted is in ascending order with no repeats. Return the index of target if it's there and, if not, the index where it would be inserted to keep the order. Without walking the whole list.
Write searchInsert(sorted, target): sorted is in ascending order with no repeats. Return the index of target if it's there and, if not, the index where it would be inserted to keep the order. Without walking the whole list.
Write searchInsert(sorted, target): sorted is in ascending order with no repeats. Return the index of target if it's there and, if not, the index where it would be inserted to keep the order. Without walking the whole list.