This document contains code for implementing depth first search (DFS) and breadth first search (BFS) algorithms on graphs. The DFS code uses a stack to search the graph in a depthward manner by recursively exploring each branch as deep as possible before backtracking. The BFS code uses a queue to search the graph in a breadthward manner by exploring all neighboring nodes first before moving to the next level. Both algorithms mark visited nodes to avoid cycles and search the entire graph by recursively calling the function on unvisited nodes.