Hi all,
I recently interviewed with Doordash where I was asked this question. I solved the problem and delivered a working solution in the hackerrank/codify platform.
https://leetcode.com/discuss/interview-question/392780/Doordash-or-Phone-Screen-or-Longest-path-duplicate-numbers-within-a-Matrix
My solution is here using BFS with a visited matrix
https://leetcode.com/discuss/interview-question/392780/Doordash-or-Phone-Screen-or-Longest-path-duplicate-numbers-within-a-Matrix/656634
The interview seemed very positive but after a couple days I got a rejection (of course no reason provided), I looked at the other solutions and while the DP solution looks succinct but its not any better in complexity than BFS. Would like to know if there is anything I missed or if I should shrug it off and move on
Best,
Clueless interviewee