added tree print to library

prints the tree by either BFS or DFS