How I started... You might end up feeling sorry for me

If you're here from my leetcode profile do read this para:

 In mid 2019 I was introduced to Data Structures and Algorithms. And like most students I struggled...Heck I even thought I'd fail the class.. But I worked my ass off and passed the course but didn't have much knowledge about it lol! At times I even thought that Computer Science just isn't for me. Trust me it gets better.

In Jan 2020 we were told that we would have on campus internship tests from June/July. So a few seniors from my college gave us extra classes in the evening after 5pm. They gave us DSA lectures in the most simplified manner and that's when I really started liking the subject which gradually became my favorite one😝. They were the ones who introduced me to leetcode. So I went back to my hostel and checked it out and honestly I was terrified and a little depressed. I found it hard to even comprehend the easy questions. Medium and hard were out of the question!! So I decided to stick with geeksforgeeks for a while. 

Problem Solving Stage 1:

I select a data structure, read about it from geeksforgeeks (it is better if you stick to one or two sources) and then solve the easy problems related to that data structure. But I found it difficult even to solve those problems!! The problems which now take me a couple of minutes to solve were impossible to solve back then. I was advised to come up with my own solution, work it out in a paper and then code it. It doesn't matter at the beginning even if the solution was not an optimized one.  Maybe I was just dumb back then I was not even able to come up with a brute force solution. So I'd look up the solution and end up feeling stupid. I was angry with myself that I couldn't even come up with a solution for such an easy problem! In spite of this I'd still try to solve the problem. For the first week I'd read a question, understand it, see the algorithm if it's given and then the code. Then I'd code it without seeing the solution. From the next week I was able to solve the basic questions on my own! Felt pretty proud of myself.. It ain't much but it was honest work. Still I was not able to solve the medium questions. But I never gave up.  This was around february. The lockdown was imposed in march and I also took a month off😝 I followed this same strategy and by the end of April was able to solve most of the easy questions. Still not enough😕 

Here are a few things I really regret:

  • It took me a while before I understood the importance of DSA but not too late

  • I used to code in C till the 4th semester. I didn't understand the importance and the advantages of using an OOP Language.

  • Consistency is key! Solving 1 problem per day for 10 days has a much greater impact than solving 10 problems once in a while.  I wasn't consistent in the beginning and it made my performance  stagnant.

A few suggestions for beginners: 

  • I highly recommend you to learn  C++/Java before you start CP or preparing for interviews. I wouldn't suggest python to be your primary language for placements as a few companies don't provide python as an option for the online test. It would be very advantageous in your placements if you're proficient in Java.  If you want to do competitive programming then I suggest you go with C++ 

  • Solving leetcode daily challenge is the starting point to maintain your consistency.

  • Quality matters more than quantity. Honestly solving 3 problems is better than solving 10 problems after looking at the solution (again as an absolute beginner it's very difficult but not impossible)

PS: These are just my personal opinions

Comments

Post a Comment