Data Structures -> Treap / Implicit Treap
Randomized split/merge tree family for ordered-set-by-key treaps and mutable-sequence-by-position implicit treaps.
- Topic slug:
data-structures/treap-implicit
- Tutorial page: Open tutorial
- Ladder page: Open ladder
- Repo problems currently tagged here:
2
- Repo companion pages:
9
- Curated external problems:
4
Microtopics
- random-priorities
- key-order-statistics
- split-merge
- implicit-key
- subtree-size
- sequence-surgery
- ordered-set-vs-sequence
- pair-key-wrapper
Learning Sources
Practice Sources
Repo Companion Material
Curated External Problems
Core
| Problem |
Source |
Difficulty |
Context |
Style |
Prerequisites |
Tags |
Why it fits |
| Salary Queries |
CSES |
Medium |
Key-Based Treap, Order Statistics |
Data-Structure-Heavy; Query-Heavy |
Split And Merge; Pair Key Wrapper |
Range-Count; Pair-Key-Wrapper |
A strong first key-based benchmark where duplicate-safe pair keys and rank differences are the whole story. |
Practice
| Problem |
Source |
Difficulty |
Context |
Style |
Prerequisites |
Tags |
Why it fits |
| Cut and Paste |
CSES |
Hard |
Implicit Treap, Sequence Surgery |
Data-Structure-Heavy; Modeling-Heavy |
Split And Merge; Subtree Sizes; Implicit Position |
Split-Merge; Sequence-Edits |
The cleanest first benchmark where cut/paste by position becomes a short split/merge script. |
| Substring Reversals |
CSES |
Hard |
Implicit Treap, Sequence Lazy Tags |
Data-Structure-Heavy; String-Like |
Split And Merge; Lazy Reversal Tag |
Reverse; Lazy-Tag |
A direct follow-up once split/merge is trusted and one reverse tag becomes the next natural extension. |
Stretch
| Problem |
Source |
Difficulty |
Context |
Style |
Prerequisites |
Tags |
Why it fits |
| Dynamic Sequence Range Affine Range Sum |
Library Checker |
Very Hard |
Implicit Treap, Advanced |
Data-Structure-Heavy; Verification |
Lazy Propagation; Split And Merge |
Affine-Lazy; Range-Sum |
The canonical verifier-style stretch once the implicit-treap family is extended with aggregates and lazy tags. |
Repo Problems
| Code |
Title |
Fit |
Difficulty |
Pattern |
Note |
Solution |
CUTANDPASTE |
Cut and Paste |
primary |
hard |
- |
Note |
Code |
SALARYQUERIES |
Salary Queries |
primary |
medium |
- |
Note |
Code |
Regeneration
python3 scripts/generate_problem_catalog.py