Module 5 - BST Operations
The best case, O(1), of searching in a BST, regardless of the size of the tree, would be if the data we searched for is at the root node. AVG: O(log n) worst: O(n) ADD 1. data 를 찾을시 search 는 성공하지만 add 는 추가하지 않는다(이미 있으니까) 2. node 가 null, 즉 비어있으면 search는 실패하지만 add 는 그곳에 데이터를 추가한다 ## child 가 null 인걸 확인하고 add 하는것이지 null node 까지 직접 가지는 않는다 curr = null 로 base case 확인, 데이터가 없을수 있으니까 data 가 현재 curr 보다 작..
2023.07.09