模版题-数组专题-二分查找
**注意选取的区间, 左闭右闭 左闭右开 均可。** 下面给出的示例代码采用的是`左闭右开`。 ```python class Solution: def search(self, nums: List[int], target: int) -> int:
**注意选取的区间, 左闭右闭 左闭右开 均可。** 下面给出的示例代码采用的是`左闭右开`。 ```python class Solution: def search(self, nums: List[int], target: int) -> int: