Linear Search
There are two ways to search an array for linear search.
i. Access each element using for loop
ii. Array indexing
Time complexity-
i. Best case- O(1) if element found on first index.
ii. Worst case- O(n) element might be found on the last/ nth i...
cvani.hashnode.dev1 min read