Searching Algorithms Questions Medium
The time complexity of linear search is O(n), where n is the number of elements in the list or array being searched. In linear search, each element is checked one by one until a match is found or the end of the list is reached. Therefore, in the worst-case scenario, the algorithm may need to iterate through all n elements, resulting in a time complexity of O(n).