The algorithm is not precise : how do you maintain the visit array ? The main loop should be described.
The algorithm is not precise : how do you maintain the visit array ?
The main loop should be described.