Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
<div class="_1l1MA">Try to start with the smallest possible integers.</div>
<div class="_1l1MA">Check if the current number can be added to the array.</div>
<div class="_1l1MA">To check if the current number can be added, keep track of already added numbers in a set.</div>
<div class="_1l1MA">If the number <code>i</code> is added to the array, then <code>i + k</code> can not be added.</div>