Question d’entretien chez TikTok

Similar to Longest Increasing Path in Matrix problem