data structures using adjacency lists abcd be cbg dcg ecf fch gfhi hei if figure graph and its adjacency list solution (apush onto the stack stackh (bpop and print the top element of the stackthat ish push all the neighbours of onto the stack that are in the ready state the stack now becomes printh stackei (cpop and print the top element of the stackthat isi push all the neighbours of onto the stack that are in the ready state the stack now becomes printi stackef (dpop and print the top element of the stackthat isf push all the neighbours of onto the stack that are in the ready state (note has two neighboursc and but only will be addedas is not in the ready state the stack now becomes printf stackec (epop and print the top element of the stackthat isc push all the neighbours of onto the stack that are in the ready state the stack now becomes printc stackebg (fpop and print the top element of the stackthat isg push all the neighbours of onto the stack that are in the ready state since there are no neighbours of that are in the ready stateno push operation is performed the stack now becomes printg stackeb (gpop and print the top element of the stackthat isb push all the neighbours of onto the stack that are in the ready state since there are no neighbours of that are in the ready stateno push operation is performed the stack now becomes printb stacke (hpop and print the top element of the stackthat ise push all the neighbours of onto the stack that are in the ready state since there are no neighbours of that are in the ready stateno push operation is performed the stack now becomes empty printe stacksince the stack is now emptythe depth-first search of starting at node is complete and the nodes which were printed are