Add dfs and bfs with optimizations
Merge pull request #1 from sdevani/master

Add dfs and bfs with optimizations