English, asked by kashish4371, 8 months ago

What is the worst case and best case time complexity of searching an element in a list and how?

Answers

Answered by preranaupadhyay742
0

Algorithm complexity and Big O notation

Algorithm       Best case                   Worst case

Selection sort O(N2)                      O(N2)

Merge sort      O(N log N)            O(N log N)

Linear search O(1)                               O(N)

Binary search O(1)                             O(log N)

Similar questions