标签:
https://leetcode.com/problems/search-insert-position/
1 class Solution { 2 public: 3 int searchInsert(vector<int>& nums, int target) { 4 int index=0; 5 int size=nums.size(); 6 for(;target>nums[index]&&index<size;index++); 7 return index; 8 } 9 };
标签:
原文地址:http://www.cnblogs.com/aguai1992/p/4637995.html