Indeed interview question

Basic algorithm questions, such as find the shortest path from root to leaf