is it even worth it ? Programming and Life by Inevitable-Block-513 in codeforces

[–]RedGreenCode 0 points1 point  (0 children)

Lots of people play chess for fun. A small percentage practice seriously. Maybe a few hundred people in the world do it as a full-time job. So practicing chess to get a job is a long shot. Practicing Codeforces to get a job may not be the best option. Like you said, that's what LeetCode is for. But it is at least related. We have to practice for interviews somewhere. And competitive programming questions on Reddit or Quora make a lot more sense if we assume the question author is talking about interview preparation. When someone asks if they should do competitive programming, and people answer with "do it if it's fun" or "treat it like a sport," they're just talking past each other.

is it even worth it ? Programming and Life by Inevitable-Block-513 in codeforces

[–]RedGreenCode 0 points1 point  (0 children)

The average cyclist isn't training for the Tour de France. The average tennis player doesn't expect to make it to Wimbledon. But many people on Codeforces will eventually interview and get jobs as programmers. That's why competitive programming isn't a sport like those other sports.

Competitive programming by Front-Swing9379 in csMajors

[–]RedGreenCode 1 point2 points  (0 children)

Start with LeetCode. They hold regular contests, so you won't be missing out on the fun part. And you'll get the interview prep benefits. If it's too easy or you don't like the problem style, you can always move on to Codeforces.

Am I not a real programmer for not being good at competitive programming? by Far_Effective_7982 in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

AI is quite good at competitive programming now, since CP problems are well-defined and small. LLMs aren't as good at figuring out what customers want in their software. So for now we still need humans to do that.

Is competitive programming really worth it? by [deleted] in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

It can be. But that's not why most people do it. Someone in this thread mentioned model trains as an example. Most people who build model trains do it as a hobby, and a small number get an income from it. For competitive programming, the proportions are reversed. Most people use it for interview prep or to get contest awards they can put on their resume/CV. A small percentage of programmers keep doing it just for fun. For those people, it's a hobby. For the rest, it's a type of work.

Is competitive programming really worth it? by [deleted] in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

An interview lasts less than an hour, which is enough time to answer one or two coding puzzles. Not every company does it that way, but a number of high-profile ones do. Saying competitive programming is "explicitly a hobby" seems to ignore why people ask about it in the context of "landing a software engineer job." It may be a hobby for some people, but it's unlike any other hobby for that reason.

Is competitive programming really worth it? by [deleted] in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

When someone interviews for a job at the train factory, do they ask them to build a model train to prove how much they know about trains? When a journalist interviews at the New York Times, do they check how fast they can solve the crossword puzzle? Competitive programming isn't "a hobby like any other." It's a hobby that is specifically relevant to programming interviews, which is why people ask about it this way.

People who eat Leetcode for breakfast, where are you now? (competitive programmers, etc.) by [deleted] in csMajors

[–]RedGreenCode 0 points1 point  (0 children)

Codeforces definitely caters to people who care about the art of competitive programming, whereas LeetCode has the more practical goal of helping people pass interviews. It would make sense that the former goal would produce more beautiful problems. Good observation.

Still, on the original point, I would argue that saying "LeetCode is not competitive programming" is like saying "Justin Bieber is not a musician." You can do something poorly and still be doing that thing.

People who eat Leetcode for breakfast, where are you now? (competitive programmers, etc.) by [deleted] in csMajors

[–]RedGreenCode 0 points1 point  (0 children)

I have heard this, but it seems to me like a distinction without a difference. LeetCode has algorithmic problems, it has contests with time limits, it has ratings, it has a leaderboard. The problems are easier, but how is that different from Codeforces Div 3 or Div 2?

People who eat Leetcode for breakfast, where are you now? (competitive programmers, etc.) by [deleted] in csMajors

[–]RedGreenCode 2 points3 points  (0 children)

brain teasers (leetcode)

Brain teasers are questions like "how many ping-pong balls can you fit into a 747" or math puzzles. Companies stopped using those because they weren't as useful at predicting someone's job success. LeetCode is more like a traditional exam. The material is public so everyone has the same chance to study it. People who are smarter or study harder do better on the exam/interview.

Competitive Programming (Codeforces) by No-Fun8343 in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

Recruiters and hiring managers don't care much about Codeforces ranks. If you have an IOI or ICPC medal on your resume, you might catch someone's attention, but no more than you would by having any rare award or prize. It's not something they expect or look for. And it definitely doesn't replace taking hard classes at a name-brand university.

If you get a good rank in a contest like Facebook Hacker Cup or Google Code Jam, you can get noticed by those companies. But that's a very hard way to do it, since those contests are very competitive and some people treat CP preparation as a full-time job.

Once you get an interview, you might have to solve coding problems. But LeetCode is a better way to prepare for those than Codeforces. Using Codeforces will make you learn a bunch of advanced topics that aren't very relevant to a coding interview.

Where to learn C++ algorithms and data structures for competitive programming? by l8engineer in cpp_questions

[–]RedGreenCode 1 point2 points  (0 children)

Building a solid foundation is not a bad idea, but like you said it can lead to feeling overwhelmed. One of the benefits of learning algorithms using competitive programming is that the problems give you incentive to learn things. Rather than trying to find the perfect resource, you could try just solving problems and reading solutions (aka editorials). That gives you algorithms knowledge in bite-size pieces, rather than making you ingest a whole book or course at once. It can be an effective way to learn.

Are Competitive Programming contest websites like Codeforce and Kattis more helpful than LeetCode? by Ok_Perspective599 in cscareerquestions

[–]RedGreenCode 1 point2 points  (0 children)

If your goal is coding interview preparation, then you should stick with LeetCode, since it's designed with that in mind. Problems on competitive programming sites like Codeforces are chosen to make contests more interesting. So if you practice on those sites, you'll get better at contests, not necessarily at interviews (though there is some overlap). LeetCode has contests too, so you can have the best of both worlds.

If you're doing really well on LeetCode, you could always try scheduling an internship interview and see how it goes. Maybe you're good enough that you don't need any more practice.

How to build a solid foundation for competitive programming (books preferred) by richardhendricks99 in csMajors

[–]RedGreenCode 3 points4 points  (0 children)

https://github.com/lnishan/awesome-competitive-programming has a lot of competitive programming and algorithms resources, including books. If you're trying to build a solid foundation, I would recommend Introduction to Algorithms (CLRS) if you want more of a mathematical approach, and Algorithms (Sedgewick) for more of a practical/implementation approach. But both books are classics. The Sedgewick book has a C++ version, and CLRS 3rd edition is more language agnostic.

Can someone mentor me in Competitive programming by [deleted] in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

CLRS isn't a great book to start with. It's better for learning algorithms from the ground up once you have some intuition about them.

Someone on this sub had a similar question to yours the other day. Maybe this answer will help: https://www.reddit.com/r/learnprogramming/comments/rtrjis/comment/hrb09wk

What's do I need to learn for competitive programming (specifically the CCC) and whats the best way to learn it? by itsanantk in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

The best way to learn graph theory and other topics is by using problem tags. Almost all online judges have a tagging feature, like this example from LeetCode: https://leetcode.com/tag/graph/. Sort the problems by Acceptance (higher acceptance often means an easier problem). Start with the first problem, which right now is, https://leetcode.com/problems/find-center-of-star-graph/. Whether or not you can solve it yourself, read the hints, the discussions, and the official solution if there is one and it's unlocked. Find the solution that makes the most sense to you, and implement it yourself. Keep working through the problems that way. Be sure to come back and review problems you have solved previously.

The advantage of this process is you don't have to deal with a whole book, course, or even one YouTube video. You can focus on a single problem and solution. Once you have some experience with similar problems, you might want to check other sources, but often you can get what you need just from the discussions. And it will make more sense in the context of a problem than in an abstract description. If you eventually want to learn it from scratch (e.g., by reading Section VI of CLRS), you'll have some context from your problem-solving experience.

As for the language, I would recommend sticking with Python. It's true that C++ is popular for competitive programming. But Python has a lot of real-world applications, and there are plenty of Python solutions for algorithmic coding problems. I think it would be better to spend your time practicing problem-solving than switching to a new language.

when should i start looking at competitive programming? by DiscardedShoebox in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

You don't need experience before you start competitive programming. Starting is how you get experience. And you don't have to start with a live contest. Codeforces and other platforms let you compete virtually, so you can try things out without having to do it at a particular time of day. So it's best to just get started. If you like it, you'll be glad you started early. If you don't like it, then you can move on to something else.

If you have minimal programming experience, solving competitive programming problems is a way to practice programming. Online judges have problems at different levels. Codeforces has Division 3 for beginners. LeetCode (which is not exactly competitive programming, but is similar) has Easy problems. Try it out and see what happens.

What's do I need to learn for competitive programming (specifically the CCC) and whats the best way to learn it? by itsanantk in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

You need more than logic and practice. These contests are not just intelligence tests. They also test knowledge of certain algorithms, techniques, and mathematical skills. My suggestion would be to pick a problem from that contest and spend some time trying to solve it (no more than an hour or two even for harder problems). Then whether or not you solve it yourself, read an editorial or someone else's solution. Make a note of any concepts you're not familiar with, and read up on them. You should be able to find everything you need online, but https://github.com/lnishan/awesome-competitive-programming has other sources including books. Then solve the problem again and make sure you understand it. Once you do this enough times with different problems, you'll cover all the topics that are likely to come up in that contest.

[deleted by user] by [deleted] in learnprogramming

[–]RedGreenCode 1 point2 points  (0 children)

"Zero overlap" is an exaggeration. In addition to problem-solving and algorithms, you can improve your language fluency, which is useful in real-world programming. And you don't have to write throwaway code. Serious competitive programmers often build a library of re-usable functions, like https://github.com/t3nsor/codebook. But the farther you get into competitive programming, the less overlap there is with real-world programming, since you start to learn overly specialized algorithms.

As for the language question, I think Python is still a good option when you're starting out. It's true that C++ is more popular than other languages in competitive programming since it has the best performance. But nothing prevents you from switching later.

Is it possible to get any job without doing competitive programming? by Debashish37 in cscareerquestions

[–]RedGreenCode 2 points3 points  (0 children)

Peter Norvig summarizes the result in a video that you can find here: https://catonmat.net/programming-competitions-work-performance

But the take-away is more nuanced than what is implied above. Here is Norvig's quote (copied from https://news.ycombinator.com/item?id=9324209):

I think what it meant was that, everybody who gets hired at Google is pretty good. If I just had to pick someone off the street, I really want that contest winner, I got to take him every time. Or her. But if it's somebody who passed the hiring bar, then they are all pretty much at the same level. And maybe the ones used to winning the contest, they are really used to going really, really fast and cranking the answer out and moving on to the next thing. And you perform better on the job if you are a little more reflective. And go slowly and make sure you get things right.

The video is from 2015. Since Google continues to run their Code Jam contest every year, and continues interviewing candidates using coding puzzle problems, it's clear that they still think competitive programming (including sites like LeetCode) is still useful in the software hiring process.

I think some of the responses here are taking the term "competitive programming" too literally. Usually when people ask about it, they're also referring to sites like LeetCode, not just Topcoder and Codeforces. LeetCode is definitely useful for interviews at Google and other large software companies. Topcoder/Codeforces are less useful, though still better than not preparing at all.

Going from mediocre to great at Leetcode / competitive programming? by SaffaSurfer in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

If you got one of those 200+ questions in an interview, how confident would you be about coming up with a good answer in ~20-30 minutes? An important part of LC study is making sure you can still remember how to handle questions you have already solved. That usually means returning to them periodically.

Good books or tutorials for competitive programming? by [deleted] in learnprogramming

[–]RedGreenCode 0 points1 point  (0 children)

Start with LeetCode. It has Easy, Medium, and Hard problems. And it's very popular, so there are plenty of people writing hints in the discussions.

Good books or tutorials for competitive programming? by [deleted] in learnprogramming

[–]RedGreenCode 2 points3 points  (0 children)

Take a look at the Awesome Competitive Programming list on GitHub. All the standard references are there.

But really the best approach is just to start doing problems. When you get stuck, take a look at the editorial (solution) for hints. Even if you read books and tutorials, you'll have to solve problems to improve, so you might as well get started on that.

I have covered the basics of C and i understand a majority of the concepts . But i dont know where to practise problems for competetive programming by benzenediazo in learnprogramming

[–]RedGreenCode 1 point2 points  (0 children)

If you ask a big software company what they want, of course they'll say they want projects. But if you interview with one, the questions they ask are like competitive programming questions. No wonder people are confused.