The Binary Exponentiation is a trick to calculate \(a^n\) in O(logn) instead of O(n) Let's see \(a^n\),\(a^n \) equals the value of 1 multiplied by a, n times. This process takes O(n) operations we can do this quickly using binary exponentiation. $$a...
rafiulhasan.rocks2 min read
No responses yet.