Step 1/0
Custom array:
Complexity
Best:O(1)
Average:O(n)
Worst:O(n)
Space:O(1)
Description
Sequentially checks each element until the target is found or the array ends. Works on both sorted and unsorted arrays.
When to use
Simple O(n) search for small or unsorted arrays. Best when you only search occasionally and the list is short.