[DSA] Search & Sorting Algorithm Tutorial [DSA] Search & Sorting Algorithm Tutorial https://www.tutorialspoint.com/data_structures_algorithms/binary_search_algorithm.htm - Linear Search 는 O(n) 의 complexity 를 갖는다. - Binary Search 는 O(log n) 의 complexity 를 갖는다. Divide and Conquer 방식이 기본이다. Binary Search 가 작동하려면 sorting 이 되어 있어야 한다. Mid position 에 있는 녀석이 찾으려는 녀석인지 확인한다. 찾으려는 녀석이 그 녀석보다 작으면 아래쪽을 다시 binary search 하고, 크면 위쪽을 다시 binary search .. 2019. 1. 13. 반응형 이전 1 다음