← Back to context

Comment by shawn_w

9 hours ago

You're basically describing the Rope. Fancier versions use self balancing trees, allowing other string operations to be fairly efficient too.

https://en.wikipedia.org/wiki/Rope_(data_structure)

It's partway to being a rope, I would say some balancing and the ability to replace substrings are crucial to a real rope.

Wow, if that is true then that‘s the most succinct explanation of Ropes I have seen. Super helpful if you are trying to learn about them, like I am.