InterviewBit Problems   K DISTANCE : Solved