1-line C++ code


  • 0
    G
        int searchInsert(vector<int>& nums, int target) {
            return lower_bound(nums.begin(), nums.end(), target) - nums.begin();
        }
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.