There\'s a data structure called treap: that\'s a randomized binary search tree, which is also a heap on randomly generated so-called \"priorities\".
There\'s a vari
Maybe you are looking for a Rope (complex form of string) modified to your needs for delayed operations. Interesting thing is that there is an open question regarding ropes right here right now.