utility function to create a graph represented as a dict
depth first recursive
depth first iterative using a list as a stack
breadth first iterative solution using a deque as a queue