The tree is transformed from an unsorted array to a so called maximum binary tree(with at most 2 child for each node) The transformation algorithm is grouping the neighbour