matthewsamuel95 / ACM-ICPC-Algorithms

Algorithms used in Competitive Programming
2.1k stars 1.27k forks source link

Added Algorithms to compute power for Huge Number #708

Closed keshav-space closed 6 years ago

keshav-space commented 6 years ago

Added new Algorithms to compute power for such numbers whose answer is too big(For instance 1 followed by thousand zeroes). Using old multiplicatiion method will render invalid result for such huge numbers(To be presise one would get 0 in case of C++14). And such algoritham is very vital for contest like ACM-ICPC.