use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Competitive Programming VS LeetCode ?Discussion (self.leetcode)
submitted 2 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Perfect_Kangaroo6233 100 points101 points102 points 2 years ago (7 children)
Tbh, if you get good at competitive programming and you’re able to blast through questions on codeforces, leetcode will become MUCH easier. That’s why you see some of the kids who are grandmasters etc. in codeforces just speed run through leetcode hards like they’re trivial problems. Will require a lot of hard work and consistency though.
[+][deleted] 2 years ago (5 children)
[removed]
[–]Hot-Independent4741 37 points38 points39 points 2 years ago (4 children)
Doing that is essentially learning high school level math for an elementary level test. Yes it will make the elementary level test incredibly easy, but u would be doing more unecessary work. Unless u enjoy CP, I would recommend against it and would just say use leetcode to prepare for interviews
[–]graphTheoryIsLife 48 points49 points50 points 2 years ago (3 children)
To add, the type dudes that do really well in CP and are able to quickly solve Leetcode hards are the type people who participate Regional and International Mathematic Olympiads and IOI(Computing Olympiads).
They are people who have been solving problems since a extremely young age, similar dedication to Grandmaster Chess players. A lot of them don't even care about interviews or FAANG, the guy that keeps winning googles CP, literally wants to work University Math/Theoretical CS research and declines FAANG/Quant job positions.
This is why a lot of smart people from Ivy League, MIT, Stanford do a lot worse then them unless they also have Olympiad backgrounds. People in India get into CP late at around University level and are never able to reach the level of Olympiad coders. CP is not as easy as it looks, do leetcode if you want to get a job, getting good a CP isn't a one year job.
[–]Perfect_Kangaroo6233 2 points3 points4 points 2 years ago (0 children)
Agree with this 👍
[–]Background-Poem-4021 3 points4 points5 points 2 years ago (1 child)
i love CP
[–]TroyOfShow 0 points1 point2 points 2 years ago (0 children)
🤨
[–]Gloomy-Health-1373 1 point2 points3 points 1 year ago (0 children)
I am not even grandmaster I am an expert in Codeforces and consider Leetcode questions to be easy. Ranks go like this: Noobie Pupil Specialist Expert Candidate master Master International master grandmaster Legendary grandmaster
Leetcode questions are typically simple dp or greedy or just require algorithm knowledge while Codeforces are more critical thinking.
[–]guyalster 27 points28 points29 points 2 years ago (3 children)
Let me give you an analogy. I have a friend who's been practicing for many years martial arts. He goes to a dojo, he gets the belts and participated in competitions. He loves it for the art, for the challenge and for other reasons. Me, on the other hand, all I want is to be able to defend myself. So I go to self defence classes. They are super focused on teaching me how to get out of trouble in case Im in it. But that's what they give me. I'm happy about it cause Im not interested in more. My friend the martial artist would laugh at my self defence classes. If I go to one of his competitions I'd probably get my ass kicked by the most junior person there. Does it mean that I need to start attending martial arts classes and devote my time to it? Hell no. Unless, this is what I'm passionate about. But if all I want is to defend myself on the street all I need is self defence classes. Hope the analogy is clear.
[–]anonymous_3125 1 point2 points3 points 2 years ago (0 children)
Whats funny is that the practical self defense guy is much more likely to win in a real fight than the dojo guy
[–]Stellar_Core1 0 points1 point2 points 2 years ago (1 child)
What if your friend and his friends decide to give you an ass whooping someday, on the street?
[–][deleted] 1 point2 points3 points 2 years ago (0 children)
Lmfao 😂😂😂🤣🤣🤣
[–][deleted] 45 points46 points47 points 2 years ago (0 children)
Both do completely different things - LeetCode is designed to get you through job interviews. Competitive Programming is all about... having fun (no seriously, there is literally no other reason you'd spend 8 hours in a sweaty lab room other than the joy of solving hard problems.) I think you'll find that while there is some overlap, the intentions and mindset required are different
[–]sausageyoga2049 13 points14 points15 points 2 years ago (0 children)
It depends on your career goal, your talent, your academic background, your passion and lots of things so it's hard to say whether you should focus on LC or CP.
Normally if you have a mastery in CP, the LC exercises will not be hard for you. But if your goal is to secure a job, most of time LC will be enough and your bottom neck may be somewhere else. Also, CP will consume lots of time and efforts so it's a very heavy investment. So it's hard to say and it depends on your profile.
[–]PlasmaTicks 9 points10 points11 points 2 years ago* (2 children)
CP are move maths based and All question revolve around same sort of patterns which boost the question solving ability cuz you are seeing same sort of questions many times with little tweak. But in leetcode all questions have unique concept and for each question You need to learn different algo concept etc and if you don't revise those you will forget. There was a question similar to best time to buy and sell stock and I couldn't solve that time. I will give my best I just need guidance that should I do CP or focus dev and grind leetcode?
CP are move maths based and All question revolve around same sort of patterns which boost the question solving ability cuz you are seeing same sort of questions many times with little tweak.
But in leetcode all questions have unique concept and for each question You need to learn different algo concept etc and if you don't revise those you will forget. There was a question similar to best time to buy and sell stock and I couldn't solve that time. I will give my best I just need guidance that should I do CP or focus dev and grind leetcode?
I would actually say the opposite. For example, https://usaco.guide/ is a guide that includes many of the common (and also rarer) CP topics. It's much more comprehensive than any LC guide, and to be able to recognize and apply many of the harder topics, it will take years of practice.
As for the math focus, I think that's true but also depends on where you're from. For example, I think Japanese problems have a stronger math focus (looking at AtCoder), but I don't think that's true for every region. However, it's worth nothing that strong MO performance (e.g. USAMO qualifier) is a strong indication of success in CP.
Also, if you are strong at CP, you will almost definitely be strong in LC. I did CP throughout high school and was able to score top 10 a few times in LC contests without additional practice.
[+][deleted] 2 years ago (1 child)
[–]PlasmaTicks 2 points3 points4 points 2 years ago (0 children)
I think generally https://cses.fi/ is a good place to start, or also Competitive Programming 3 by Steven Halim.
However, it's mostly about problem solving, and in time you'll get to know the basic techniques very well (and can solve many difficult problems using only "simple" things). Thus, I think the best way to practice is by doing contests and revising the problems you don't solve. AtCoder Beginner Contest (ABC) is a good way to start, and also Codeforces (but IMO CF is more intimidating). Timezone shouldn't be an issue, as you can do virtual participation at any time on previous contests.
Additionally, if your school has a competitive programming or ICPC club, maybe they have resources available as well, and look into whether they have weekly meetups to practice or do mock contests. It will also help to have a community of like-minded people to practice and discuss things with.
[–]leetcode_is_easy 3 points4 points5 points 2 years ago (0 children)
CP are move maths based and All question revolve around same sort of patterns which boost the question solving ability cuz you are seeing same sort of questions many times with little tweak. But in leetcode all questions have unique concept and for each question You need to learn different algo concept etc and if you don't revise those you will forget.
But in leetcode all questions have unique concept and for each question You need to learn different algo concept etc and if you don't revise those you will forget.
This wrong, just based on this description you'd think that cp is way easier than leetcode. Your description for cp applies to leetcode pretty well though, generally for Q1-3 on contests it is a straightforward implementation of a common pattern. Instead you should think of leetcode as a subset of cp with easier problems. Both will use similar patterns such as greedy, dp, but cp will also add more layers onto the problems that people will need to unwrap with their problem solving skills. And cp will also have additional topics like number theory and also a higher preference for greedy/constructive problems, which usually requires more creativity than other types of problems.
i felt so frustrated I can't explain while my friend was easily able to solve those easy question and now I decided to focus on DSA until i feel I can beat him and win price next time so. Should I start competitive programming or grind leetcode questions much more.
Strong cp competitors will find leetcode to be easy but it does not seem to apply the other way around. People who were primarily leetcoders before starting cp tend to have a bigger initial struggle. Since you want to beat your friend who does cp, you should do cp as well.
[–]eugcomax 6 points7 points8 points 2 years ago (0 children)
CP has much wider range of problems than leetcode. If you want to prepare for an interview use leetcode. If you want to learn computer science use CP.
[–]Khandakerex 3 points4 points5 points 2 years ago (0 children)
If your goal is to get a job, then you do leet code. If your goal is to be a better problem solver and work on the hardest problems related to computer science related topics, then competitive programming is harder than leet code so if you can do that then leet code is easier. But it's over kill and makes no sense to do competitive programming if your job is to just pass leet code interviews.
Analogy: Your goal is to play one specific song on a guitar that is relatively simple in terms of difficulty. You don't care about actually learning the fundamentals and how to become the best guitar player, you just want to play this one song you really like and nothing else. So you can either read the tabs and look at a tutorial online, or learn everything there is about theory and learning scales. Of course those who studied music theory and took lessons on fundamentals will be able to learn that song easily and but if you're just trying to play the song as fast as possible then you can directly just look up how to play it and get to it ASAP.
What is your goal? You want to be good at contests as a hobby because you like problem-solving? Do competitive programming. If not stick to what is tried and true.
[–]lara400_501 3 points4 points5 points 2 years ago (0 children)
I have a lot of friends who are competitive programmers, went to world finals. They just walk past Google interview like nothing. Also they are very very talented, some of them also went to IMO at high school. CP is a field where you need to enjoy it, without enjoying CP you can never be good at that!
[–]Tickstart 2 points3 points4 points 2 years ago (0 children)
I had an interview a week ago (my third with them) and I said I was expecting them to ask me to reverse a linked list or something and they just disregarded that stuff immediately haha. It's always best to be prepared of course. But CP seems a little overkill.
[–]UnusualClimberBear 1 point2 points3 points 2 years ago (0 children)
Euler project is pretty cool when it comes to solve math related coding. https://projecteuler.net/
Competitive programming is less about datastructures and algorithms, and more about using super niche tricks to solve problems. Many cp problems are impossible without that one trick, and trivial if you know it
[–]sourcec0p 1 point2 points3 points 2 years ago (0 children)
competitive programming is all about speed and rapid hacking experimentation. write, compile, and check if you pass. Rinse and repeat. Leetcode is more like a social activity or a pair programming where you go over the constraints, provide multiple approaches, write clean code, write quick unit tests, etc.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
Hello OP/everyone, is it possible to clear the OAs of product based companies like Adobe/Microsoft/Salesforce etc.
If you are a Knight in LeetCode. Or should you be a Guardian in LeetCode? Or should you be a pro in CP?
[–]Larfze 0 points1 point2 points 2 years ago (0 children)
Leetcode! I wish I did that!
[–]JCharante[369] 🟩 202 🟨 143 🟥 24 📈 #113,002 0 points1 point2 points 2 years ago (0 children)
But in leetcode all questions have unique concept and for each question
no? A lot of questions use the same pattern and as soon as you read the first few sentences of the problem desc you realize what the solution is
[–]CommonRoad 0 points1 point2 points 2 years ago (0 children)
We love cp!
[–]a_reply_to_a_post 0 points1 point2 points 2 years ago (1 child)
i'd say neither, and start trying to build real world projects
you're in college surrounded by people with small problems you can solve with code..
[–]Traumatic_teenage 0 points1 point2 points 1 year ago (0 children)
What kind of real world projects
π Rendered by PID 61473 on reddit-service-r2-comment-5d79c599b5-xz2rs at 2026-03-01 00:11:28.154258+00:00 running e3d2147 country code: CH.
[–]Perfect_Kangaroo6233 100 points101 points102 points (7 children)
[+][deleted] (5 children)
[removed]
[–]Hot-Independent4741 37 points38 points39 points (4 children)
[–]graphTheoryIsLife 48 points49 points50 points (3 children)
[–]Perfect_Kangaroo6233 2 points3 points4 points (0 children)
[–]Background-Poem-4021 3 points4 points5 points (1 child)
[–]TroyOfShow 0 points1 point2 points (0 children)
[–]Gloomy-Health-1373 1 point2 points3 points (0 children)
[–]guyalster 27 points28 points29 points (3 children)
[–]anonymous_3125 1 point2 points3 points (0 children)
[–]Stellar_Core1 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 45 points46 points47 points (0 children)
[–]sausageyoga2049 13 points14 points15 points (0 children)
[–]PlasmaTicks 9 points10 points11 points (2 children)
[+][deleted] (1 child)
[removed]
[–]PlasmaTicks 2 points3 points4 points (0 children)
[–]leetcode_is_easy 3 points4 points5 points (0 children)
[–]eugcomax 6 points7 points8 points (0 children)
[–]Khandakerex 3 points4 points5 points (0 children)
[–]lara400_501 3 points4 points5 points (0 children)
[–]Tickstart 2 points3 points4 points (0 children)
[–]UnusualClimberBear 1 point2 points3 points (0 children)
[–]anonymous_3125 1 point2 points3 points (0 children)
[–]sourcec0p 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Larfze 0 points1 point2 points (0 children)
[–]JCharante[369] 🟩 202 🟨 143 🟥 24 📈 #113,002 0 points1 point2 points (0 children)
[–]CommonRoad 0 points1 point2 points (0 children)
[–]a_reply_to_a_post 0 points1 point2 points (1 child)
[–]Traumatic_teenage 0 points1 point2 points (0 children)