Breadth first search and depth first search examples

Can someone post a code for each traversals using strings?
I need to get some ideas where to start.
Simple examples

Topic archived. No new replies allowed.