Pergunta de entrevista da empresa ZoomInfo

Leetcode hard question. Horse Greedy algorithm