Leetcode, Codechef, Codeforces, Codestudio, Hackerrank, and so on. You must have heard people saying I code on this platform and feel you're lagging. I've been contacted by many juniors and even batchmates asking how they can start solving problems on Leetcode or any other similar coding platform. In this blog, I'll guide you to start your coding journey. While I don't consider myself an expert, I believe I have sufficient knowledge to assist those who are just beginning.
I'll be dividing this blog into 3 sections:
For absolute beginners who don't know any programming language.
For those who know at least one object-oriented language.
Those who have solved a few DSA questions are unsure of what to do next.
Before we move on, here's something to motivate you:
"Success is the sum of small efforts, repeated day in and day out."
— Robert Collier
Absolute Beginners
If you're an absolute beginner who has just started his/her coding journey then I would like to recommend you not to look into the vast ocean of youtube videos because you'll be overwhelmed by it.
I'm not against the thought of exploring new things but when you're just beginning something and you see so many resources, you might be swamped by all those suggestions.
So how can you start your journey in a more oriented manner?
Your priority should be to learn an object-oriented language like Java, C++, Python, etc. before anything else. You can go for C-language as well but learning an Object-Oriented Language has its benefits like pre-defined functions, reusable code, etc.
Resources to learn some of the above-mentioned languages:
Java:
Python:
C++:
Okay! okay! I know the playlists have plenty of videos but you don't need to watch all of them to start with your journey. Learn the basic topics like data types, conditional statements, loops, arrays, etc. These topics are enough to get you started with solving easy problems.
Where to practice?
As a beginner, do not directly jump to solve Leetcode Questions. Even Leetcode easy problems have a certain level that needs some practice before you dive into them. To start with solving problems you can go to Hackerrank. It is the best beginner platform I've come across till now. Even I started my journey from this platform. You can even choose which language you want to code in on this platform.
How much time will it take to complete learning and practicing the basics?
The time of completion depends purely on your consistency and learning speed. If you're a quick learner then you should not take more than 15-20 days to complete the basics and practice some questions on Hackerrank. If you like to take baby steps then you can take a month or so to complete the basics. It's totally up to you but I would recommend not to give more than a month to the basics because you have a lot to cover ahead.
Just to remind you, It's all about consistency.
Novice Programmers
If you're someone who knows about different programming languages but has never solved DSA-based problems then this category is for you!
Looking up on the internet, you will see that DSA has a variety of topics with many many related questions. Leetcode alone has over 2000 questions. Overwhelming right?
The best way to get started with the questions would be to follow a particular pattern. As a novice, it's better to start with Math and Arrays as it's the most basic topic and easier to understand.
What strategy should you follow?
You can choose any one of these sites:
It's completely your choice which platform you want to practice on. I have recommended the platforms I used when I started solving DSA problems. The best thing about GeeksforGeeks and Leetcode is that they have tag-based problems which help you to understand which Data Structure or Algorithm will be used in solving the given problem.
Also, these platforms conduct weekly contests which will help you boost your programming skills.
If you want to do it more systematically then you can follow this amazing DSA sheet by Striver, a Software Engineer at Google and the founder of takeuforward.
This sheet is perfect for beginners who are just stepping into the DSA world. The benefit of solving questions from this sheet is that you can get the video solutions of all the questions on takeuforward channel so if you are stuck on any question you can easily watch the video and understand the underlying concept.
Keep the momentum going! Each new line of code is a step toward your dreams.
Competent Programmers
Folks who have already solved a good number of problems can consider themselves to be in this category. By now you must have built a habit of solving Leetcode daily challenge or GeeksforGeeks POTD. Even if you haven't then it's high time you should start it. Solving a random problem given on the platform will not only increase your problem-solving skill but also help you practice the concepts you have learned so far.
Also, you should give the weekly contests conducted on these platforms. Contests help you greatly in time management. Solving 4 problems within 1 hour 30 minutes or 2 hours is a challenging task and if you can do it then you're already a pro.
Even I consider myself to be in this category. Though I'm still developing the habit of giving weekly contests which sometimes seems difficult but I know it's worth it.
What else can you do to improve your skills?
Start solving different SDE sheets. There are several SDE sheets by eminent people in the tech industry like Striver and Love Babber. To practice well you can follow either of their sheets. The choice of the sheet should be based on how much time can you give to problem-solving.
If you have around 5-6 months or more then you can follow Love Babbar's sheet which has a total of 450 questions covering all basic to advanced-level problems.
In case you have lesser time then you can follow Striver's SDE sheet which has a total of 191 important questions which are mainly asked in interviews.
There are other SDE sheets as well but these two are the most recommended ones.
REVISE!! I know remembering all the approaches can be difficult. Trust me even I'm struggling with that. So what I do to remember the approach to a given problem is whenever I solve a problem from any Sheet, I note down the approach in a notebook and revise it later. Just going through the solution reminds me of the approach and sometimes I also add short notes to it so next I see a keyword I can remember the approach instantly. (This method was given by Striver in one of his videos and I guess it's really helpful).
If you have read till here that means you are actually passionate about learning and improving yourself. Best of luck with this journey and in case you have any queries, feel free to reach out to me on LinkedIn or Twitter. You can find my socials in my profile.
Last but not least, remember that Steve Jobs once said: The only way to do great work is to love what you do.
Thanks for reading! ^_^