https://practice.geeksforgeeks.org/problems/kth-element-in-matrix/1