People often use the term competitive programming to refer to any activity (besides homework) where programmers create solutions to made-up puzzles rather than real-world problems. For example, consider this Quora question: Which is the best online judge for competitive programming, HackerRank, HackerEarth or LeetCode? As Bohdan Pryshchenko points out in his answer, these three sites focus on interview practice, not competitive programming in the traditional sense. Their questions cover topics likely to come up in an interview. And although some of them host contests, those contests don’t consistently attract the strong contestants who regularly show up for Codeforces and Topcoder events.
When I’m writing Quora answers, I sometimes point out the difference between competitive programming and interview preparation if it’s relevant to the question. But while I’m always in favor of using terms correctly, I’m not sure how important this distinction is in the scheme of things. Consider that:
Coding interview questions require knowledge of topics like graphs, trees, and dynamic programming algorithms, all of which are used in competitive programming.
Participation in competitive programming tapers off quickly as the problems require more advanced algorithms. For example, see the bottom graph in this Quora answer. Red coders on Topcoder are a long tail at the high end of the rating distribution, while the bulk of the contestants are clustered in the large gray-green-blue area. At these levels, competitive programming questions use well-known algorithms, just like interview questions do.
Competitive programming owes most of its popularity to its association with coding interviews. If it was just about coders solving puzzles, it would be a niche activity even within the software engineering world.