3 lines C Solution


  • -2
    S
    int searchInsert(int* nums, int numsSize, int target)
    {
    	while (numsSize &&  nums[numsSize - 1] >= target)
    		numsSize--;
    	return numsSize;
    }

Log in to reply
 

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