Recently, I have been taking some sessions on the road to mastering Data Structures and Algorithms and Competitive Programming. Leetcode contests are perfect for those who want a grip on their DSA concepts and want to experience competitive pressure. Now, you might be thinking, “Do we really need to read this article and who’s this person?”
So, I must tell you that I have been coding properly for like past 6–7 months only. I started Leetcode contests probably in like September of last year. Since then, I have given almost all the contests, and it took me just 15 contests to get into the top 3% of Leetcoders. You can do the same with a little bit of dedication and motivation. Just keep these points in mind:
No matter if you are busy with your exams or day-to-day work, you must take some of your time and give it to the contest. Leetcode Biweekly contests are held alternating Saturdays at 8 pm IST, and Weekly contests are held every Sunday at 8 am IST. If by any chance you missed any contest, attempt a virtual contest. Virtual contests give you an idea of what your ranking would be, but it will not change your rating.
Generally, people participate and then post contests that don’t try to solve unsolved problems or try to find a more optimized approach for the problem they have solved. Note this: if you do not upsolve, you can’t learn anything from the contest.
Those who don’t learn from their mistakes are bound to repeat them.
Like if you have solved A and B questions. Then give one day to review the solutions you have solved and one day to solve the C and D questions.
Contests on platforms like Leetcode, GeeksForGeeks(GFG), and CodeStudio are more based on DSA and not on competitive concepts. So for these contests, you should have a good grip on below mentioned topics:
Arrays
Linked Lists
Stack/Queue/Priority Queue
Trees: Traversal questions and the DFS approach are important
Graphs: Graph algorithms like Dijkstra and Floyd Warshall are important.
Greedy Algorithm
Dynamic Programming
Union Find
Two Pointer Approach
Sliding Window
Hold on; Trees, Graphs, and Dynamic Programming take time. These are a bit lengthy topics and need more practice.
Refer to my curated repository for topic-wise codes for various problems and concepts.
P.S: First try to solve the problem on your own.
Follow: https://github.com/Kanav-Arora/DSA-Guide for DSA Roadmap and Solutions.
This is one of the most important points. Directly jumping to the solution makes you handicapped and will not improve your problem approachability. First, give it a thought, and try to dry-run your solutions on given test cases. Solve it on a paper and then submit it. Then only should you consider looking for the solution.
Now, the most common mistake people make is they prefer text solutions over video solutions but text solutions can’t have that much of an understanding. You need to get the intuition of the problem so that you can solve it again on your own.
Believe it or not, Leetcode problems are the same or somewhat similar to the interview problems. So, you must solve these if you are appearing for a tech interview.
Thanks for reading! If you like the article, please give it a clap👏, and follow the publication for more such stories. Follow me on