#3718

Smallest Missing Multiple of K

easy · 63.1% accepted · 54 likes · top 65%

array · hash table

Description

Given an integer array nums and an integer k, return the smallest positive multiple of k that is missing from nums.

A multiple of k is any positive integer divisible by k.

Solution