Basics-Wrapup

View on GitHub

Linear Search

a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection.

Linear Search UML Diagram

Time Complexity = O(n), Space Complexity = S(0).