You are given the edges that form a tree with the root as 0. A traversal of the tree is generated in the following manner:
You are given multiple traversals of the tree, and you need to find which of the traversals provided can be a valid BFS order traversal of the same.