Since, V_{8} is starting vertex, so it is pushed initially onto the stack.

STACK : V_{8}

Now, V_{8} has four neighbors V_{4}, V_{5}, V_{6}, V_{7}, so these are pushed onto the stack and V_{8} is marked as visited.

STACK : V_{4}, V_{5}, V_{6}, V_{7}

Now, V_{7} has only one neighbor V_{3}, so it is pushed onto the stack and V_{7} is marked as visited.

STACK : V_{4}, V_{5}, V_{6}, V_{3}

Now, V_{3} has two neighbors V_{6} and V_{1}, so these are pushed onto the stack and V_{3} is marked as visited.

STACK : V_{4}, V_{5}, V_{6}, V_{1}, V_{6}

Now, V_{6} has no unvisited neighbors, so it is marked as visited.

STACK : V_{4}, V_{5}, V_{6}, V_{1}

Now, V_{1} has only one neighbor V_{2}, so it is pushed onto the stack and V_{1} is marked as visited.

STACK : V_{4}, V_{5}, V_{6}, V_{2}

Now, V_{2} has two neighbors V_{4} and V_{5}, so these are pushed onto the stack and V_{2} is marked as visited.

STACK : V_{4}, V_{5}, V_{6}, V_{4}, V_{5}

Thus, we can see that 3 vertices are pushed twice V_{4}, V_{5} and V_{6}.