1. Searching #
Created Tue May 14, 2024 at 10:23 PM
Linear Search #
API - almost all containers have a built in function. See 1-Containers
Binary Search #
- Not possible on linked lists, since arr[mid] (accessing the middle) is not possible due to random access prevent.
- Versions
- Existence check (boolean)
- Exact index (of first occurrence)
- lower bound - greater or equal value, but nearest. “Right side”
- lower bound - lesser or equal value, but nearest. “Left side”.