Andrei Alexandrescu wrote:
>> Thx, but then I am missing the whole point of this thread.
> It's simple: the OP wanted this:
> - start with a bidir range r
> - move from the LEFT in it for a while
(prefix, postfix)= inPlaceSplit( r, predicate, Move.RIGHT)
// == O(prefix.len)
> - then reverse whatever is to the LEFT of the walking point
retro( prefix)
// == O(1)Please note: even if the runtime of `retro' would be Theta(n) the runtime would still be limited by O(prefix.len) -manfred
