$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #250

Fill the blank

# a loop over n inside a loop over n
# time complexity: O(n^____)

Answer: 2 (also accepted: 2)

Nested loops over the same n items give quadratic time, O(n^2).
Play Problem Solving ▸