Modular exponentiation 12355

not getting the right ans
https://ide.codingblocks.com/s/52425

you are using a^b…
It uses O(n) complexity.
Try using O(log n) . Hit like if u get it

1 Like