Multiple choice technology

If I am given a list of numbers, what will be the best time complexity to find out the maximum number from the list?

  1. logn

  2. n

  3. n^2

  4. nlogn

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Finding the maximum number in an unsorted list requires examining every single element at least once, resulting in a linear time complexity of n.