visual-cs / Rope

← Back

Rope: split and concatenate long strings without copying everything.

Leaves store short chunks, internal nodes store the left-subtree weight, and index lookup walks the tree by comparing the query position against each weight. Try build, index, split, then concatenate the halves back together.

Speed 5
Length
0
Leaves
0
Height
0
Operation
Build
Result
Ready
Current String
Left Half / Query Result
Right Half