https://practice.geeksforgeeks.org/problems/distance-of-nearest-cell-having-1/0