Guide to Competitive Programming

This chapter introduces the most important data structures of the C++ standard library. In competitive programming, it is crucial to know which data structures are available in the standard library and how to use them.

This often saves a large amount of time when implementing an algorithm. First describes the vector structure which is an efficient dynamic array.

After this, we will focus on using iterators and ranges with data structures, and briefly discuss deques, stacks, and queues.

Discusses sets, maps and priority queues. Those data structures are often used as building blocks of efficient algorithms, because they allow us to maintain dynamic structures that support both efficient searches and updates. Shows some results about the efficiency of data structures in practice.

As we will see, there are important performance differences that cannot be detected by only looking at time complexities.