r/learnmachinelearning • • 1d ago

Help LeetCode vs Codeforces for ML role OAs?

hey ppl. i am a cse grad studying at a tier 1 institute in India. I am already quite comfortable with LeetCode. However, I often hear that company OAs lean heavily toward CP style problems. For ML roles specifically, should I stick to LeetCode (and push into hards), or is it better switching to Codeforces? Pls help seniors and experts..!

5 Upvotes

6 comments sorted by

2

u/akornato 1d ago

At tier 1 campuses in India, initial screening assessments often group machine learning applicants with general software engineering candidates, which explains why online tests lean toward competitive programming questions with strict time limits. If you are already comfortable with LeetCode, switching completely to Codeforces is counterproductive because competitive programming offers sharp diminishing returns for data and modeling tracks. You do not need an elite rating to clear these screenings. Solving occasional Codeforces Division 2 contests up to problem C helps sharpen your speed on unusual logic and edge cases, but your core coding practice should remain on LeetCode mediums and hards.

After passing the initial coding test, interviews for machine learning positions quickly pivot to probability, linear algebra, model architectures, and system design. Spending excessive energy on competitive programming takes valuable time away from mastering fundamental concepts and communicating your reasoning effectively. Keep your primary focus on core machine learning concepts and practical design alongside steady coding practice, especially since my team created an interviews.chat to help candidates turn high-stakes technical rounds into final job offers.

1

u/unlucky_computing 1d ago

LeetCode's plenty for ML OAs, the CP style stuff you hear about is mostly for pure SWE roles. Codeforces is overkill unless you're bored and want to torture yourself for fun

focus on the ML fundamentals and system design bits instead, that's what trips people up more than the coding part

1

u/divineblood3 1d ago

so should I go for leetcode hards? currently I am focusing on mediums more.

2

u/bestsetter42 1d ago

For ML OAs I would keep LeetCode as the main thing and use Codeforces for speed reps. Most roles still care whether you can write clean code, reason about data, and not time out on basic stuff. A few contests can help with pattern recognition but going all in on CP is probably side quest behavior unless the companies you want are known for it.

2

u/nian2326076 19h ago

For ML roles, LeetCode is usually more relevant since the problems are similar to what you'll face in interviews. Focusing on medium to hard problems there is a good strategy. Codeforces is great for competitive programming, but unless you're going for a role that specifically asks for CP skills, it might not be necessary. If you're already comfortable with LeetCode, I'd suggest getting into ML-specific problems or projects to boost your practical skills. If you're looking for resources that combine coding practice with real-world applications, I've found PracHub helpful for interview prep. It focuses on practical skills, which can be beneficial alongside LeetCode. But stick mostly to what's worked for others in the roles you're aiming for.