Hi,

Just to add to the amazing answer given by @pratku123, I can suggest you some things which I’ve been doing myself and appear to be working, although, very slowly.

What I’ve been doing is simple:

Explore ALL the websites!!! Get accounts on as many sites as you can and solve as many problems as you can!! Even if you can still only solve 1 or 2 problems on your own, study the editorials and see solutions from top competitors. Start “packing” problems by their specific types:

See a problem with a large array and queries? Fenwick Tree/Seg-Tree is the way to go. When you reason about it on paper, do you end up repeating calculations yourself? Maybe DP with memoization helps… If you don’t have any sort of “template” codes for all these methods, use the solutions from editorials and/or top competitors and adapt them so you feel comfortable using them… build yourself what I call a: “code library of concepts”, i.e. you now have codes for SegTrees, general memoization, fast exponentiation, dfs/bfs, etc… These concepts show up ALL the time along with Mathematics and some “classical”/ad-hoc problems and, if you have them “stored” as code templates, your understanding of them and of some previously unapproachable problems feels almost like magic! Seriously!!.

These “classical” ones have been the hardest ones for me to master and I guess that they take A LOT of time to master unless you are a “natural talent”. Well I’m not, but I can safely say that taking part in several websites has at least helped me, even if only to broaden my horizons and build myself a “code library”. After a while doing this you will “naturally” get sharper and better, but, it takes time

And above all,

Have fun, that’s the only thing that matters!!

Bruno