35. Search Insert Position

题目: 解题思路: 其实遍历一遍即可,还有就是要处理一下特殊情况,其中有一个小细节需要注意。先贴代码: int searchInsert(int* nums, int numsSize, int target) {//sorted array int loc=0; int flag=0; int i=0; while(i<numsSize-1){ i
相关文章
相关标签/搜索