Binary Lifting(Jump pointers)

The generic problem it solves:-