geoffreyrulz4542 geoffreyrulz4542
  • 01-01-2021
  • Computers and Technology
contestada

Imagine that we have a list of names called nameList. There are various algorithms we could run on it. Here's one such algorithm, which compares each name in the list to every other name:

Respuesta :

IfeanyiEze8899 IfeanyiEze8899
  • 02-01-2021

Answer:

The algorithm has a quadratic time complexity of O(n^2)

Explanation:

The algorithm has two nested for-loop statements. The length of the name list is denoted as "n". Every name searched in the name list has a time complexity of n, therefore the time complexity of finding two names is (n x n) =  n^2, which is denoted as O(n^2) in Big-O notation.

Answer Link

Otras preguntas

The expression 20L + 25G – 10 calculates the number of dollars that the ABC Lawn Company makes from mowing L lawns and raking G gardens. How many dollars does
Which best summarizes the findings of Hershey and Chase?
7.) Nate has $267 in bills. None of the bills is greater than $10. He has eleven $10 bills. He has seven fewer $5 bills than $1 bills. 7a.) How many $5 and $1 d
I need help writting 3-5 paragraphs on why i should b a project manager.
The most important part of collecting a specimen for a test is
Answers to the question
HELP QUICKLY PLEASE! Complete the sentence with the correct form of estar: Mi amigo ________ en Peru. está están es son
I NEED HELP ON THESE QUESTIONS PLZZZZZ (Specifically question 2)
Ben made a four digit number with the numbers 7,4,3,9. The number was smaller than 4 and bigger than 1. The 7 cannot go in the tenths place, and 9 must go to an
HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!