随笔分类 -  LeetCode刷题

记录LeetCode刷题
摘要:LeetCode 35. 搜索插入位置 思路 直接利用二分模板 注意右指针开始为nums.size()而不是nums.size() - 1因为有可能在最后一位插入 class Solution { public: int searchInsert(vector<int>& nums, int tar 阅读全文
posted @ 2022-08-22 17:12 hjy94wo 阅读(23) 评论(0) 推荐(0)