C # program to Check if a given array contains duplicate elements within k distance from each other
using System ; using System . Collections . Generic ; class GFG { static bool checkDuplicatesWithinK ( int [ ] arr , int k ) {