prabaprakash / Hackerrank-JavaScript-Solutions

Solved entire Easy, few Medium Problems. A total of 171/563 challenges solved by JavaScript
https://www.hackerrank.com/prabaprakash
123 stars 63 forks source link

Maximum Palindromes #6

Open prabaprakash opened 4 years ago

prabaprakash commented 4 years ago

Algorithms to solve it,

  1. Modular multiplicative inverse
  2. Combinatorics and Permutation
prabaprakash commented 4 years ago
  1. A billion and 7 is prime.
  2. Basic modular arithmetic
  3. Fermat’s little theorem
  4. Exponentiation by squaring
  5. Precomputing tricks