3 ms·
The point isn't reading, the point is writing. Inserting a single character into a string is an O(n) operation. Inserting one in a rope is basically O(log(n)),
by konjin 6y ago
The point isn't reading, the point is writing. Inserting a single character into a string is an O(n) operation. Inserting one in a rope is basically O(log(n)), same for deletion.