C Algorithm Implementation Error Dfs Stack Overflow

C Algorithm Implementation Error Dfs Stack Overflow