Find MEX with a twist using element additions or subtractions
Filed under CarWale
The question
Find the MEX (smallest missing non-negative integer) of an array, given that you can perform unlimited operations on each element by adding or subtracting a fixed value x.
No write-up yet. Related questions below have one.
Related CarWale questions
Collected from public candidate posts and coding forums. Updated Nov 2026.