Sounds like you need Dijkstra's Algorithm for graph searching; the order in which it visits those nodes should be the order you're looking for.
In reply to Re: Sorting problem
by moritz
in thread Sorting problem
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |