What is the worst case time complexity of a linear search algorithm?
O(n log n)
Worst case scenario means assuming element is not available in the given array. in this case we have to check all the elements. so worst case goes to n comparisons so it is O(log n) times. eg: if array has 32 elements then we have to compare for O(n) times. that is O(32).
Back To Top