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, andsetfeel familiar separately but not as one toolkit- simple implementation tasks still take too long because of syntax pauses
Warm-Up¶
vectorandstringpairandtuple- sorting with lambdas
Core¶
mapandsetmultisetpriority_queuelower_boundandupper_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¶
- quick syntax + flags -> Foundations cheatsheet
- template inventory -> Template Library
Exit Criteria¶
You are ready to move on when:
vector,set,map, andpriority_queueno longer feel interchangeable- you can explain why
sort + uniqueorsetis the better fit for one task - you can write a small comparator or
lower_boundcall without stopping to search syntax