Find the smallest non-negative integer missing from an array (MEX)
Company: Mercari
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Other
Overview: Given an array of non-negative integers, return its MEX, the smallest non-negative integer that does not appear in it. It tests hash set lookups, bounding the range of values worth checking, and handling duplicates and very large values without wasting memory.