/dataStructure-Algorithms

java implementations of classic algorithms

Primary LanguageJava

dataStructure-Algorithms

Noted some of the imp implementation from collection of advanced DS, as taught by William Fiset. (William's repo | William's channel)

Data Strucutres:

  • Arrays
  • Dynamic Arrays

Euler's totient function:
- Euler's totient function, also known as phi-function ϕ(n), counts the number of integers between 1 and n inclusive, which are coprime to n. Two numbers are coprime if their greatest common divisor equals 1 (1 is considered to be coprime to any number).
- Divisor sum property: ∑d|nϕ(d)=n , here the sum is over all positive divisors d of n. - Euler's theorem: aϕ(m)≡1(modm), if a and m are relatively prime. - When m is prime, Euler's theorem turns into Fermat's little theorem: am−1≡1(modm),
- Euler's theorem and Euler's totient function are used to compute the modular multiplicative inverse.