In: Computer Science
Please explain what the Big O Notation is in plain English. Please include the logic behind it and calculations if necessary. I have trouble understanding it, I will be taking a test soon so I will need an easier way to remember it.
I use Python btw.
Big O notation is one of the most fundamental tools for computer scientists to analyze the cost of an algorithm. It is a good practice for software engineers to understand in-depth as well.
Big O notation describes the complexity of your code using algebraic terms.
To understand what Big O notation is, we can take a look at a typical example, O(n²), which is usually pronounced “Big O squared”. The letter “n” here represents the input size, and the function “g(n) = n²” inside the “O()” gives us an idea of how complex the algorithm is with respect to the input size.A typical algorithm that has the complexity of O(n²) would be the selection sort algorithm.
Big O also gives describes the upper bound of the complexity.
Code language doesn't matter whether You use python or any otherthis is used for the complexity of the algorithm.
**If any other help required please comment below I will answer your doubt.
---------------------------------------------Please Upvote---------------------------------------------------------------------------------