wait actually it's more like this:
let's say you have a problem where n<=2e5. so you know your code has to be nlogn or better. then, as your are designing your algorithm, you just need to store a single boolean in your head:
"is every part of my algorithm so far <= nlogn"
wait actually it's more like this:
let's say you have a problem where n<=2e5. so you know your code has to be nlogn or better. then, as your are designing your algorithm, you just need to store a single boolean in your head:
"is every part of my algorithm so far <= nlogn"