


linearizeTree -- A breadth first linearization of a tree input: tree: the tree to linearize output: An array with the number of nodes as length. For every node the label is given in the array, beginning with the root node, in a breadth first order. example: For the tree o node1 1 |-node2 2 | |-node2 3 | |-node1 4 |-node3 5 | |-node2 6 | |-node1 7 the result is as follows : [1 1 5 3 4 6 7]
