W2D4 221124 이분탐색과 재귀 (Binary search & Recursion)
Binary search 이분탐색
- Binary search is whenver a list is cut into half with each iteration to search for a value, instead of searching element by element from the beginning
- Takes O(logN)
- The list to be search must be ordered to work
Recursion 재귀
- Call a function inside itself to loop the recursion
- The loop must be broken with
return
in a conditional statement