Before you say “O(n²)”, define what n means. In many problems you have more than one size parameter.
See how we define input size and how complexity is written.
For BFS, is input size just n? No → it depends on |V| and |E|.
Now that n is clear, use Growth Visualizer to compare common complexity functions.
Open 03 — Growth Visualizer →