Quadratic Complexity

Quadratic Complexity

As you might guess by now-- in a function with quadratic complexity, the output steps increase quadratically with the increase in the inputs. Have a look at the following example:

JAVASCRIPT
OUTPUT
Results will appear here.