LeetCode Journey to ace 'Knight' title

HarshHarsh
5 min read

In this blog, you will get to know about the journey of starting from scratch and becoming knight on LeetCode. It took a total of 483 questions and 21 contests to cross the 1850 rating required to acquire the title. It has been written to the point and covers all the insights I gained after doing LeetCode for sometime now.

My Introduction and Background

So, I had little time to search for internship and I needed to sharpen DSA skills in a short span of time. I chose to go with LeetCode as a platform as it requires less time compared to competitive coding. I had done coding questions to a basic level in the past but implementing and modifying algorithms to need in order to solve the question is what get's you selected in interviews.

Resources to Cover DSA:

If I have to be honest and have an option to share only one resource to follow, it would definitely be none other than striver a-z sheet . Yes, this resource with the YouTube videos is sufficient to cover a good ground for cracking interviews.

Next on the list, I found these resources to be useful:

  • Aditya Verma Playlist

  • DSA with luv (perfect for beginners)

  • Love Babbar

Remember to solve and cover questions topic wise and not jump over without understanding logics and things. It's completely ok to look at solution for problems which you couldn't solve but revise them later and ask yourself why you couldn't solve it that time.

You don't need to follow all the resources but cover the key concepts and build confidence. How will this confidence come? Simple, by solving random questions of a particular topic and selecting medium followed by hard difficulty.

Approaching a Coding Problem:

I have made some points to help you get started with how to approach a problem in first place.

  • Observation: very obvious for greedy, if greedy fails then try all cases (recursion) and apply dynamic programming.

  • Constraints: helps to decide what can be time complexity of algorithm to apply

  • Dividing a problem into sub-problems: solve a portion of problem and think what would you do for next.

  • Eliminating approaches to get to right one: for example check if a monotonous function can be created for binary search or if backtracking fails then BFS will be applied in some cases.

  • Experience and Patience: some special patterns of Binary search with DP, DP on trees

  • Advance Algorithms: String algorithms, Graph practice.

Some points sounds vague? No problem ignore these jargons and only upsolve and upsolve understanding the concept behind every problem. Remember to not move forward without leaving a problem, sometimes it may take a whole day to completely get a hard problem from first principle thinking but it's ok. Don't be chasing the numbers game and you will get through.

Participating in Contests:

Now, when you have covered a-z sheet and solved a good bunch of questions, it's time to participate in contests. The only thumb rule is to upsolve every time and you need to solve 3rd question consistently to reach Knight on LeetCode.

A common mistake people do is to take too long to participating in contests, remember you will never feel fully ready and you will have to dip yourself in this to get started. It may be uncomfortable but that's how it goes. Don't stick around solving advance topics like Segment/Fenwick trees or even too many easy questions. Just start and you will get the idea of things.

I found solutions of Coding Mohan to be useful and to the point. Remember to not give up when your rating goes down and it's a matter of time and patience when results will show up.

Tips and Suggestions:

Solve 2 and 3 question of previous 15 contests to get an idea about what type of questions come in the contests. Usually the first one is an easy one and ranks matter on those 2 questions.

Optimizing questions time complexity. Don't leave the question if you passed the test cases, try to look if you can optimize the solution's time complexity and look at others solution. This tip is overlooked by many and is very crucial for cracking interviews where you would be expected to come up with most optimal approach.

You can participate in virtual contests to replicate the environment. Remember it's more a mind game to cross the barrier than actually it is.

I won't suggest using a coding template in contests as used in competitive programming as we tend to learn more to crack interviews where pre-written algorithms won't be helping us.

Finally you will get a badge which will justify this few months grind. Remember to not leave this in between, you can be slow at times but quitting is not allowed.

It's not a destination to reach but a milestone in our problem solving journey. There's a long way to go but I personally believe that one get's comfortable and starts enjoying the process without worry about ratings after few initial months of grind. You may consider adding this in your resume to get shortlisted for interviews. With that being said, let's wrap this blog and share your feedback in the comments below.

Liked my blog. Ping me on social media here.

Twitter Link: https://twitter.com/HarshUmpoxy

LinkedIn Link: https://www.linkedin.com/in/harsh-kumar-24318b207/

0
Subscribe to my newsletter

Read articles from Harsh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Harsh
Harsh

Technology and Problem Solving motivates me. Code and Computer Science is what I Practice. Portfolio: https://portfolio-harshumpoxy.vercel.app/