Use alphabetical order for neighbors (A, B, C, D, E, F).
- When pushing neighbors onto the stack we iterate the neighbor list in reverse alphabetical order so the smallest alphabetical neighbor is popped (visited) first.
- Stack notation: [bottom, ..., top] (top
Show more…