Harry is going out on a date with Megan. He is planning out the situations he might face.
What algorithm is he employing to search through the possibilities?
Relevant algorithms :
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Harry starts with an arbitrary node(in this case the situations he might prepare for) and then he traverses deep into it ( i.e 1)A)a) ) and could have traversed deeper if his girlfriend wouldn't have come.
Thus he is applying the Depth First Search Algorithm .
"Well i guess algorithms are more fun than girls."