Learn C++ STL

Lesson 6 of 9 · The STL in Competitive Programming: Which Container for Which Problem

Module 16 · The STL in Competitive Programming: Which Container for Which Problem

Six Contest Patterns, Six Interview Answers, and Six Bugs

ProReading

Kenji remembers container names under contest pressure. Amara remembers the next operation and the fact it must preserve. They may write similar code, but only one can explain why an index may disappear. This pack practises that explanation beside complete small programs.

Checking what this lesson needs for you…

What is inside Six Contest Patterns, Six Interview Answers, and Six Bugs

  1. Pattern 1: the question chooses the container
  2. Pattern 2: two deques describe a window range
  3. Pattern 3: two pointers minimise a sufficient stretch
  4. Pattern 4: settle current route claims
  5. Pattern 5: compress first, accumulate second
  6. Pattern 6: ranks change after removal
  7. Six interview questions with model answers