Re:Rope (data structure)
by samatman on Saturday June 08, 2013 @01:01PM
(#5845456)
It is a tree, where the leaves are substrings, and the nodes are the sum of the lengths of all the leaves under the node.
Thus, the root node has a value equal to the length of the string; it has two child nodes, with values equal to the lengths of the first and second 'half' of the string, and so on.
Thus, the root node has a value equal to the length of the string; it has two child nodes, with values equal to the lengths of the first and second 'half' of the string, and so on.