Thales interview question

Write a Depth First Search Function