View allAll Photos Tagged two-same
Problem Statement
In this problem we are given an array of integers and we have to check if there exists any duplicate element which are at a distance of at least k to each other.
i.e. the difference between the indices of those two same element should be less than equal to k.
Or, nums==nums and abs(i-j)
www.tutorialcup.com/leetcode-solutions/contains-duplicate...