Term
O(n²): quadratic time
The work grows with the square of the number of elements. Double the input and the time roughly quadruples. Two nested loops are the typical case.
The work grows with the square of the number of elements. Double the input and the time roughly quadruples. Two nested loops are the typical case.