O(n squared) Quadratic
← Back to Common Classes
Quadratic time complexity. Typically arises from nested loops over the input. Examples include bubble sort, selection sort, insertion sort, and brute-force substring matching. Becomes impractical for large inputs.