Pergunta de entrevista da empresa Wix

a couple of leetcode problems involving matrixes and math