- 博客(3)
- 收藏
- 关注
原创 Search Insert Position
题目来源:https://leetcode.com/problems/search-insert-position/ 题目描述:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were
2015-11-18 14:44:23 128
原创 Search for a Range
题目来源:https://leetcode.com/problems/search-for-a-range/class Solution { public: // 记住最后递归的left 和right 能够减少寻找左边界和右边界的时间。 int binarySearch(vector<int> &nums, int left, int right, int target) {
2015-11-18 14:19:45 119
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人