Consider the routine below which checks whether the input myArray
contains at least one duplicated value. Determine the run-time complexity of the routine using Big-O notation.
def check_for_duplicate(myArray):
for element_a in myArray:
for element_b in myArray:
if element_a == element_b:
return TRUE
return FALSE
The algorithm as written above has a run-time complexity of
Box 1: Select the best answer