Not long ago ToxicPie9 posted a blog explaining common mistakes in competitive programming and how to avoid them. I was greatly inspired by that post so I decided to write an episode on my own.
I have implemented some of the data structures that I often use in Competitive Programming. I also mentioned how to build. Also, in most cases, I will give you a chance to find out what the hard part is before I reveal the culprit as I tried to make this blog interactive. The codes that I have used in this blog have been written in Python as it is the most used language for CP.
Segment trees
Definition:
Click me