Smallest Missing Non-negative Integer After Operations
Count each number by its remainder modulo value, then build 0, 1, 2, and so on, spending one count from the matching remainder each time.
Count each number by its remainder modulo value, then build 0, 1, 2, and so on, spending one count from the matching remainder each time.