This is a verified interview question from Uber. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Smallest Ride Identifier" covers key patterns like Other.
"Uber generates ride identifiers that must follow strict compliance and formatting constraints due to regional regulations and internal validation rules. Given an integer n and a set of allowed_digits of size k, find the ride identifier representing the smallest positive integer such that: * The ride identifier is a multiple of n * Each digit of the ride identifier must be present in allowed_digits * No two consecutive digits in the ride identifier are equal Return a string ride identifier if it satisfies all the conditions. If no such ride identifier exists, return '-1' as a string."
Join thousands of developers practicing for Uber.