← MakeMyTrip questions

Generate Non-Repeating Random Numbers from Array

Filed under MakeMyTrip

Design a class that picks a random number from a given array such that no two consecutive calls return the same number. The selection should remain random and unbiased among the available…

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.