Instead of return -1 and index, we just need to output left since the left pointer always point to the first index which not less than target. However, I do not know the mechanism behind it. Magic.
leetcode-35-Search Insert Position
阅读 10
2023-08-23
Instead of return -1 and index, we just need to output left since the left pointer always point to the first index which not less than target. However, I do not know the mechanism behind it. Magic.
相关推荐
精彩评论(0)