[ R.I.P. ]
MSX Utilities
 by Oleg Alferov aka Secoh 
     

Uplink...

in Russian...


Windows
Utilities



MSX
Emulator...



About...

Links...

Friends...

Mailing List...
 
BASIC Editors    BASIC Visual effects    BASIC Games    Programming studies    File converters

Answer

The program can maintain one more array Z[i] that contains 0 if the corresponding point is not (yet) listed, and 1 if it is. Since R[i] already defines the return direction, no other information is required for this point.

(This option is not implemented in the code example I put on my web site. It can potentially slow down the program by the graph's connectedness number.)
 


© 2002,
Oleg Alferov
aka Secoh
secoh@anl.gov