Create a temp array to hold visited flag of all elements . Note that , calloc is used here so that all values are initialized as false
visited = [ False for i in range ( n ) ] NEW_LINE for i in range ( n ) : NEW_LINE