binary search1 Binary search LeetCode-704 문제 Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1. You must write an algorithm with O(log n) runtime complexity. 오름차순으로 정렬된 정수 숫자의 배열과 정수 대상을 숫자로 검색하기 위한 함수를 작성합니다. 대상이 있으면 인덱스를 반환합니다. 그렇지 않으면 -1을 반환합니다. 런타임 복잡도가 O(log n)인 알고리즘을 작성해야 합니다. Example 1:예시 .. 2022. 6. 11. 이전 1 다음