Searching
Linear Search
- Best case
- Word case
Find element with loop
Binary Search
-
For sorted data
-
Find halfway point, see if equal, smaller, or larger
-
Discard half that it cannot be in, split in half, and repeat
-
Best case
-
Word case
Find element with loop
For sorted data
Find halfway point, see if equal, smaller, or larger
Discard half that it cannot be in, split in half, and repeat
Best case
Word case