이진검색1 Binary Search - 이진탐색/이진검색 Problem: Given a sorted list of integers and a target integer, find the index of the target integer in the list using binary search. If the target integer is not in the list, return -1. 정렬된 정수 목록과 대상 정수가 주어지면 이진 검색을 사용하여 목록에서 대상 정수의 인덱스를 찾는다. 대상 정수가 목록에 없으면 -1을 반환. Example Input: lst = [1, 3, 5, 7, 9, 11] target = 7 Example Output: 3 Explanation: Binary search works by repeatedly dividing the li.. 2023. 2. 16. 이전 1 다음