Skip to content

STL Ladder

Use this ladder to get comfortable with the default contest toolbox.

Who This Is For

Use this ladder if:

  • you know the container names, but still guess which one to use
  • sort, lower_bound, and set feel familiar separately but not as one toolkit
  • simple implementation tasks still take too long because of syntax pauses

Warm-Up

  • vector and string
  • pair and tuple
  • sorting with lambdas

Core

  • map and set
  • multiset
  • priority_queue
  • lower_bound and upper_bound

Stretch

  • replace a slow hand-written structure with an STL one
  • compare ordered vs unordered containers carefully

Repo Anchor

  • Distinct Numbers: a clean first note for vector, sort, unique, and container-choice thinking.

Retrieval Layer

Exit Criteria

You are ready to move on when:

  • vector, set, map, and priority_queue no longer feel interchangeable
  • you can explain why sort + unique or set is the better fit for one task
  • you can write a small comparator or lower_bound call without stopping to search syntax

External Practice