-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You must write an algorithm with O(log n) runtime complexity.
Example 1:
Input: nums = [1,3,5,6], target = 5
Output: 2
Example 2:
Input: nums = [1,3,5,6], target = 2
Output: 1
Go to folder : C++/Java/Py
Give today's date
Take your GitHUB username id like "AkP2809", etc which you have.
File extension = .cpp/.java/.py in this issue.
Combine all 3 to get your file name : Problem Name + "_" + Username + File Extension, ex. "ReverseInteger_AkP2809.cpp".
Create this file in above mentioned folder only "/C++/".
This will ensure no file will be conflict and any number of contributors can work on the same issue.