Rope Data Structure
Split at:
Split
Insert:
at
Insert
Reset
Rope: binary tree for strings. Leaves hold string fragments; internal nodes store subtree weight. Split/concat O(log n). No copying large arrays.