Level Order Traversal of a tree
问题 In order to do level order(BFS) traversal of a generic tree I wrote the following display function for the code mentioned in the link below. The problem is that each level is printed twice. Can someone tell me why. Original Code without this function can be found in the link below in case someone need the entire implementation else just look at the displayBFS function below and tell me why are values repeating Level Order traversal of a generic tree(n-ary tree) in java Thanks! void displayBFS