We introduce a new breadth first search (BFS) parent array encoding of trees as integer sequences. The new representation enables the inclusion of parent- children relations in a straightforward way, which is not the case with the existing representations. We also introduce a children array representation for binary trees and a simple algorithm for generating binary trees (including parent-children rela- tions) using the notation.
展开▼