Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
866 views
by | 866 views

1 Answer

0 like 0 dislike

Step 1: Learn any object oriented language.

I prefer Java/C++. Start with solving easy problems on GeeksForGeeks. It is the best resource on internet for categorized learning.

Learn STL and understand it’s inner structure too. It is going to be the most useful library when you start with competitive coding.

Step 2: Time and Space Complexities

You have to understand time and space complexities. Period. You not only have to understand it’s calculation but you should also know how to alter time/space in order to optimize your code.

Every interviewer will grill you over time and space complexities of your solution. Moreover these are preliminary factors to evaluate how good your solution is.

Step 3: Data Structures

Do not jump into the ocean of DSA without forming a proper strategy. You will find a pool of DSA questions on the internet, don’t get lost. According to me, the ideal way is to follow up any course for structured learning.

I always recommend DSA course by GeeksForGeeks-Course | DS and Algo Foundation for time efficient and systematic learning. (Check bio for more)

How to solve and Optimize?

Solve on a pen and paper. DO NOT start coding unless you are pretty clear with the logic of the problem.

Spend around 30–45 mins with every ques, not less not more.

Look into the solution/ editorial if you are not able to solve it. Let me tell you this, the challenge is not to solve on your own but to definitely solve it when you come across a similar problem for the second time. I used to hesitate in looking into the solution which wasted a lot of my time.

After you have solved the problem, analyze it completely, speak aloud and walk yourself through the naive to most optimised solution of the problem.

  1. Estimate the time and space complexities
  2. Check for any repetitive or unnecessary loops.
  3. Decreasing the time complexity with increment of space utilisation (Trade-off between space and time)
  4. Scrap this solution and think about new one.

Step 4: Practice

Practice is the key to excel in coding. GeeksForGeeks, also known as the encyclopedia of coding has numerous questions with editorial so practice atleast 4 problems each day.

A little trick that I used is, maintain a notepad of the problems which are extremely tough for you and visit those problems on daily/ weekly basis. This will keep on reiterating the logic in your mind and you will get hold of it.

Never memorize the code. Understand the logic and practice the same code at regular intervals.

Learn to use the debugger. It's going to save a lot of your time if you practice fixing the error with the help of debugger.

And finally, code with passion. Never give up. It might be tough but keep on pushing yourself. You'll soon get there.

by