Tinder interview question

Implement BFS algorithm