如果您查看维基百科上绳索的定义:
A rope is a binary tree where each leaf (end node) holds a string and a length (also known as a "weight"), and each node further up the tree holds the sum of the lengths of all the leaves in its left subtree
为什么用于字符串的绳索最终只能在叶节点处获得数据? 例如,您是否有理由不使用avl并在树中的每个节点上存储字符串?