mw1122   2년 전

이진 탐색을 하는 find 함수에서 lo와 hi는 [-1, len(L)] 이고 mid의 범위는 [0, len(L)-1] 아닌가요?

protarie   2년 전

Input:
2
1 1

Output:
Traceback (most recent call last):
  File "main.py", line 26, in <module>
    L[idx] = n
IndexError: list assignment index out of range

Expected:
1

댓글을 작성하려면 로그인해야 합니다.