TikTok interview question

Implement a DFS for a matrix to find a certain value