High-order approximation of the finite horizon control problem via a tree structure algorithm