https://practice.geeksforgeeks.org/problems/smallest-distant-window/0