IBM Interview Question

Reverse integer and dfs question