https://leetcode.com/problems/search-insert-position/
【Leetcode 练习 35.找到插入位置】class Solution {
public:
int searchInsert(vector
int i;
int flag=0;
for ( i=0;
i
if (target <= nums[i])
{
return i;
}
}
return i;
}
};
推荐阅读
- TLS(Thread Local Storage)问题demo
- STL应用之输入任意个整数,并按从大到小排序并输入
- C语言缺陷与陷阱(3)
- C++学习|数组去重
- C++学习|Config Class
- C++ 宏定义 #define 和常量 const 的区别
- C++中Public Static和Private Static区别