372. Super Pow | LEETCODE MEDIUM | MODULAR ARITHMETIC

preview_player
Показать описание
Code linK :

Рекомендации по теме
Комментарии
Автор

instead of 10 times, we can use doubling

like 5^25 == 5 * 5^24 == 5 * 25^12 == 5* 625^ 6 == 5* 390625 ^3....
this should be the fastest way to reduce the large number,

rajveersingh
Автор

Can't we use Fermat's Little Theorem in it????

VipinYadav-uqme
Автор

sir hindi me bola kareye jyada acche se samajh aayega ....nice explaination
thank you

shubhamjaiswal