Healthy.io interview question

Leetcode question something with matrixes