Nooks interview question

Implement BFS for a toy problem. Why is it slow?