IBM interview question

Reverse integer and dfs question