← All problemsSign in

3718. Smallest Missing Multiple of K

LeetCodeArrayHash TableOpen on judge ↗

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. Example 1: Input: nums = [8,2,3,4,6], k = 2 Output: 10 Explanation: The multiples of k = 2 are 2, 4, 6, 8, 10, 12... and the smallest multiple missing from nums is 10. Example 2: Input: nums = [1,4,7,10,15], k = 5 Out

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start