← MakeMyTrip questions

Modular multiplicative inverse modulo 10^9+7

Filed under MakeMyTrip

Given an integer n, compute its modular multiplicative inverse x such that (n * x) % (10^9 + 7) == 1. Assume n is not a multiple of 10^9 + 7.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related MakeMyTrip questions

Collected from public candidate posts and coding forums. Updated Nov 2026.