🎯 Set Operations
USACO C++ Book · Interactive Visualizer
🔵 Set Operations — Insert/Find/Delete/lower_bound Full Demo
std::set
O(log N)
Step 0/9
📊 Internal BST Structure (elements in ascending order)
🗂 Set Current State
Elements (ordered)
Operation Result
Insert/Delete/Find:
O(log N)
lower_bound/upper_bound:
O(log N)
💻 Code
Hint
Click
Next Step ▶
to start and observe how set automatically maintains order and how lower_bound performs binary search.
◀ Prev
Next Step ▶
↺ Reset
0/9
Keyboard:
→
Next
←
Prev
R
Reset