Modular Exponentiation (Power in Modular Arithmetic)
Modular Exponentiation is the process of computing: xy (modââp). where x, y, and p are integers. It efficiently calculates the remainder when xy is divided by p or (xy) % p, even for very large y. Examples : Input: x = 2, y = 3, p = 5Output: 3Explanation: 2^3 % 5 = 8 % 5 = 3.Input: x = 2, y = 5, p =