algorithm binary_tree data_structure depth_first_search recursion stack tree tree_traversal