What traversal is used in bfs in tree data structure?
Answers
Answered by
4
Answer:
We will examine how a common data structure can be used to help traverse a tree in breadth-first order. A preorder traversal would visit the elements in the order: j, f, a, d, h, k, z. This type of traversal is called a depth-first traversal. ... An inorder traversal would give us: a, d, f, h, j, k, z.
Similar questions