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

Question:

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

a. Finding the average of the numbers in an array of integers

b. Finding the closest distance between any pair of points in an array of Points

c. Finding the maximum value in an array of real numbers

d. Counting the median length of the Strings in an array

e. Raising an integer to a power—for example, AB

f. Examining an array of Points to see how many trios of points are colinear—that is, how many groups of three points could be connected by a straight line

g. Counting the number of lines in a file

h. 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).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: