Polynomial execution performance e.g. O(N2) or O(N3) etc
Polynomial execution time O(N2)
An big O description such as O(N2) or O(N3) and so on describes an algorithm whose performance is related to a polynomial. The time an algorithm takes to run increases at a faster rate than the increase in the size of the input. In the case of O(N2) for example, the performance is proportional to the square of the amount of data. In other words, if you enter 2 data items, the performance is 4. If you enter 3 data items, the performance is 9. If you enter 4 data items, the performance is 16. If you enter 5 data items, the performance is 25. We can show this as a graph.
An example in Python
A good example of an algorithm with this kind of Big O characteristic O(N2) is a bubble sort. The performance of a bubble sort is greatly reduced the more data items there are that you have to sort through. In fact, any algorithm where there are nested iterations will probably show this characteristic.
You can see how a bubble sort works here.
You can see the pseudo-code for a bubble sort here.
You can see the Python code for a bubble sort here.
Once you have your bubble sort working, you can count the comparisons as we did for the linear example O(N). You will see that the number of comparisons you have to make goes up considerably with the number of data items you have to search through.