https://bgoonz-blog.netlify.app/docs/javascript/bigo/

Big O: big picture, broad strokes, not details

For a more complete guide… checkout :

Time Complexity

no loops or exit & return = O(1)

0 nested loops = O(n) 1 nested loops = O(n^2) 2 nested loops = O(n^3) 3 nested loops = O(n^4)

recursive: as you add more terms, increase in time as you add input diminishes recursion: when you define something in terms of itself, a function that calls itself