constructs a tournament tree from an array