For a given graph G, the Mostar index Mo(G) is the sum of absolute values of the differences between n(u)(e) and n(v)(e) over all edges e = uv of G, where n(u)(e) and n(v)(e) are, respectively, the number of vertices of G lying closer to u than to v and the number of vertices of G lying closer to v than to u. The degree sequence of a tree is the sequence of the degrees (in descending order) of the non-leaf vertices. This paper determines those trees with a given degree sequence which have the greatest Mostar index. Consequently, all extremal trees with the greatest Mostar index are obtained in...