Data Structures & AlgorithmsModerateICPC regional · GATE CS

Problem: What is the multiplicative inverse of 3 modulo 11 (the value x with 0 ≤ x < 11 and 3x ≡ 1 mod 11)?

  1. A. 5
  2. B. 3
  3. C. 4
  4. D. 6

Correct answer: C. 4

Since 3 × 4 = 12 ≡ 1 mod 11, the inverse is 4. The extended Euclidean algorithm finds the same value.

More Coding Interview Problems questions

Exams that ask this topic