Build binary tree, min, max, to link list