logo CodeStepByStep logo

bigoh_algorithms

Language/Type: Python algorithm analysis big-oh
Related Links:

Determine the complexity classes of the algorithms that could be used to perform the following tasks:

Finding the average of the numbers in a list of integers
(order shuffled)
Finding the closest distance between any pair of numbers in an unsorted list (without modifying or copying the list)
(order shuffled)
Finding the maximum value in an unsorted list of real numbers
(order shuffled)
Counting the median length of the strings in a list
(order shuffled)
Counting the number of lines in a file
(order shuffled)
Determining whether a given integer representing a year stores a leap year (a year divisible by 4, but not divisible by 100 unless also divisible by 400)
(order shuffled)
A sequential search on an unsorted list
(order shuffled)
A binary search on a sorted list
(order shuffled)

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.