dfs and bfs
bfs and dfs implimented to tree node