4 ms·
Well, you can already have half of a split unicode character at the beginning and end of a substring in the rope. If that doesn't happen (like in the "parens"
by asrp 9y ago
Well, you can already have half of a split unicode character at the beginning and end of a substring in the rope.
If that doesn't happen (like in the "parens" or "other" description), to use CYK, I think you could maybe have piece of the table for each substring (so for all entries with both indices inside the substring) in each node but then I don't think the operation at the parent is commutative. And you have to decide to copy the info from the children or not (if not, you'll spend an extra log n time looking down the tree).