Bang-Jensen, Gutin and Yeo [Combin. Probab. Comput. 6(3) (1997) 255–261] investigated hamiltonian cycles avoiding the union of disjoint cliques in tournaments: for a k-strong tournament \(T=(V,A)\) on n vertices, a partition \(X_1,X_2,\ldots , X_p\) of V with \(|X_1|\le |X_2|\le \cdots \le |X_p|\) , and a digraph D obtained from T by deleting all arcs which have both head and tail in the same \(X_i\) (i.e., \(D=T-\cup _{i=1}^p {A(T[{X_i}])}\) ), if \(|X_p|\le {n}/{2}\) and \(k\ge |{X_p}|+\sum _{i=1}^{p-1}{\left\lfloor {{|{X_i}|}}/{2}\right\rfloor }\) , then D is hamiltonian. They showed the bound on k is the best possible and raised the problem: which sets B of edges of the complete graph \(K_n\) have the property that every k-strong orientation of \(K_n\) induces a hamiltonian digraph on \(K_n-B\) ? The above result provides the sharp bound of k when B is the union of cliques. In particular, they asked what are sharp bounds for k when B is a spanning forest (or a spanning cycle subgraph) of \(K_n\) , consisting of p disjoint paths, or p disjoint stars (or p disjoint cycles) containing \(r_1, \ldots , r_p\) vertices, respectively. In this paper, we give the bounds for k on the above problems and prove these bounds are almost best possible, when each component of the spanning forest (or spanning cycle subgraph) has at most 3 vertices.