@dalias what.. how is that even logically possible. it needs n iters to reach the beginning of the iteration range. then m iters to go through the range, buffer all results. then another m to go through the buffer in reverse (the actual reverse iteration). space needed is also m.
do you know of a different way to do this? b/c it doesn't seem like 1-step-iterators give us much freedom here.
or do you build an ad-hoc search tree? then the space needed would be log m and m log m makes more sense