Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Is it correct to use "to do" twice in a sentence? For example: is it correct to say "how to do that and when to do that is a problem" or should it be "how to do that and when doing that is a problem"?