Binary Search

보보캉·2021년 3월 2일
0

Algorithm

목록 보기
3/18

이분 탐색

  1. 오름차순 정렬 후
  2. mid = (low + high) / 2
  3. target값과 mid값을 비교 후 low, high 값을 이동 후 반복

java

Arrays.binarySearch(inputArray, target);

시간복잡도

O(logn)

profile
Developer

0개의 댓글