AlgoMaster Logo

Contains Duplicate II

nums=[1, 2, 3, 1],k=3
0 / 5
algomaster.io
Step:Check every pair no more than k = 3 apart, and stop at the first repeat