Hey all! Programming is a never-ending sea of learning and opportunities, and it will be intimidating for a beginner, especially. You all might have lots of doubts in your mind about where to refer, is this worth it, am I doing something wrong, etc. So, in this blog, we will answer a few of the most frequently asked questions by beginners who just embarked on their coding journey.
How do I start my CP journey?
I am sure you would have thought about this question at least once when you plunged into Competitive Programming. In case if you are wondering what exactly is Competitive Programming or CP, then have a look at this for a clear-cut explanation. There are lots of resources available, making it difficult for beginners to choose from and learn. Just like how you need a recipe to cook a new dish, you need the right resources to start your coding journey. It’s critical that you understand the basics, and for that, you can refer to the following.
- Competitive Programming 3 by Steven Halim
- Competitive Programmer’s Handbook by Antti Laaksonen. These two books are the most tested and recommended by top Competitive Programmers for beginners.
- For in-depth knowledge about algorithms, design, and implementation: Introduction To Algorithms, Thomas H. Cormen, and
- Algorithm Design by Eva Tardos.
Of course, referring to these alone won’t be sufficient. You need to practice constantly. Attempt beginner-friendly questions on sites like CodeChef, and slowly build your way up and start participating in contests such as Long Challenge.
How to approach a problem even if you have no clue about which algorithm to use?
It’s absolutely okay that you can’t think of any algorithm that would best suit the problem. All of us develop that habit over years and constant practice. So the next time you get stuck at a particular problem, refer to Google. There will be hundreds of video editorials available on YouTube where people explain the fundamental idea, how they arrived at the specific solution, and even a full-fledged code with explanation! You can even refer to online coding communities where coders discuss and arrive at a solution. Another method that you can try is visualising using a pen and paper. As soon as you see the question, don’t jump to a conclusion and start coding. Take a minute or two, visualise the problem, and jot down the points you think would help.
How to improve my logic building skills?
The most important thing to achieve this goal is the three P’s – Patience, Practice, Preparation. Intuition building takes time, and it is possible only with constant practice. No one can assure you that if you solve 500 questions, you will master the art of coding. The golden number varies from person to person. When you start coding, try to break down the questions into multiple parts instead of analysing the technicalities as a whole. Figure out the constraints, test cases, sub-tasks that you need to implement, and then start making a visual map of how the solution should be. Make a mind map or even a flowchart to help you with this process. Another important aspect that can help you is ad hoc questions. You need not have any specific data structure knowledge for solving ad hoc problems. Each ad hoc problem is unique, and you need to get down to the very root and try to understand the problem, make observations, and then try to solve them.
Which language should I learn first?
There are many programming languages out there, and instead of trying to master everything at once, choose one language of your choice. For a beginner, there are four recommended languages to choose from: C, C++, Python, and Java. Some prefer Python because of its beginner-friendly syntax and inbuilt libraries, whereas some recommend C because it’s a general-purpose language. The answer that you will inevitably reach is “it depends”. So you can choose one of these languages and then understand the core concepts, syntax and how to implement the logic. After you have a grip over the language, choose another language and understand the syntax.
How is Competitive Programming going to help me?
The question must be, what do you not get from Competitive Programming. You might have heard of Malvika Raj Joshi, the girl who was homeschooled and yet made it to MIT because of her stellar record in Competitive Programming. All the top-notch companies, including FAANG, look for people who are good at Competitive Programming. Apart from the coding skills and job offers, you also learn to manage your time effectively, think logically in a much faster and accurate way. The contests will be very tight in time, so you will need to develop the skill to think straight and code as fast as possible, thereby making you a disciplined and focused coder. Since most competitions are team-based, this also helps you to be a team player and do work effectively with your team members.
Well, now that atleast a few of your doubts are cleared it’s time to head over and start your preparation. Here’s a list of beginner-friendly problems that you could start with and move up the ladder as you learn.