We consider the class G(S n ) of orientation preserving Morse–Smale diffeomorphisms of the sphere S n of dimension n > 3, assuming that invariant manifolds of different saddle periodic points have no intersection. For any diffeomorphism f ∈ G(S n ), we define a coloured graph Γ f that describes a mutual arrangement of invariant manifolds of saddle periodic points of the diffeomorphism f. We enrich the graph Γ f by an automorphism P f induced by dynamics of f and define the isomorphism notion between two coloured graphs. The aim of the paper is to show that two diffeomorphisms f, f′ ∈ G(S n ) are topologically conjugated if and only if the graphs Γ f , Γ f ′ are isomorphic. Moreover, we establish the existence of a linear-time algorithm to distinguish coloured graphs of diffeomorphisms from the class G(S n ).