Here is the implementation of the code:- https://ide.codingblocks.com/s/450970, the question is described below, please tell what is the error or what test case might I be missing because for one TC it is showing wrong answer.
Exponentiation with Modulus
It is giving TLE now. And also please explain the reason of taking modulus every time?
Please do explain why modulus is taken at every step of recursion and why not the final modulus after computing x^y is correct?