Run time error in Depth first search question

Question link:- LeetCode

My code gives SIGGSEGV error on geeks for geeks ide but runs fine in ideone ide. How is this possible ?? Can someone find the runtime error ?? Same code runs on one ide perfectly and fails on another ide.??

LInk to ideone code >>vL9jl9 - Online C++0x Compiler & Debugging Tool - Ideone.com

Link to geeks ide code >>Online Compiler and IDE - GeeksforGeeks

When I reduce the size of array to 100 i.e. int visited[100][100]; it runs successfully. It seems that Ideone IDE has more memory as compared to Geek for Geeks.

1 Like

Yep you are right ,thanks !!!