摘要:
1. 原题链接 https://leetcode.com/problems/search-insert-position/description/ 2. 题目要求 给定一个已经排好序的数组和一个目标值,假设该数组中没有重复值,返回目标值在数组中的插入位置下标。 3. 解题思路 利用折半查找法定位插入 阅读全文
摘要:
1. 原题链接 https://leetcode.com/problems/search-for-a-range/description/ 2. 题目要求 给定一个按升序排列的整型数组nums[ ]和目标值target(int类型),如果数组中存在目标值,返回目标值在数组中的起始位置和结束位置,[s 阅读全文