Can someone explain me in detail the algorithm BABY - STEP GIANT-STEP which i came to know by seeing this problem https://www.hackerearth.com/problem/algorithm/dexter-plays-with-gp-1/description/
I tried in various tutorials but unable to understand.
Thank You!