The story is about my third year.I have completed my third year I went to Delhi for my TCS exam.Outside the exam hall, there were about 2000 students I'm just talking about only one slot. When I went inside the exam hall. questions were about aptitude and coding coding questions were so easy,it's on prime numbers you can't even imagine I was unable to solve that question It was the first set back of my life.Even though I can't solve that question But still I had qualified for that interview I had a big fear of failure so, I had self rejected mine Let's know what I have done differently in my journey which helped me in cracking a 2CR package and I how have learned DSA [INTRO] Hello everyone my name is Rohit Negi.Today in this video I will talk about How I mastered Data structure and algorithms When I was preparing for GATE, at first I had learned about DSA yes I had also studied when it was in my syllabus but that was only for passing marks but when I was preparing for GATE, I took it seriously and I had cleared the DSA concepts then initially, I had faced many problems.
If you do the concepts you also may face problems with pointers like me Recursion is one of the most dangerous topics in my opinion.I think most of us face problems in that If you have clear concepts of recursion then you can easily master graph and DP so,make your mind that you will face difficulties for about one or one and half months.It was same for me also I had completed Data Structures and algorithms in between 1.5 to2 months yes but I had not written the code .I just made the notes,read it and understood the logic before I had studied DSA I only knew one language that was C++ I only knew the basics like how the for loop and while loop work,how some function call works I did not know more than that in any language but it's the required knowledge for starting DSA so I had studied DSA during GATE and got admission into M.TECH so I have to start coding first. I had remembered that In my TCS exam I had not coded and I failed miserably Now I had to code well.
So, at first I took a language you can learn any of the one from C++ and JAVA. you may think why I'm not recommending any other language like python or java script generally who code in python they also knew c++or java. only then they switch to these languages You should not directly jump into python or javascript, you may face problems if anybody asks how the heap works, how sorting works, you are using direct libraries then you may face problems for these I want you to start with C++ or JAVA if you know the basics of C++ then start DSA. you don't have to learn OOPS first then DSA When you start DSA you have to learn STL.STL means Standard Templete Library it's a library file in which we don't have to write the complete code of stack queue , we have to write just a line of code that's why STL is necessary when I have started my coding journey ,I have started form Geeks for Geeks that time I was confused someone said GFG,someone said Interviewbit , someone said Leet Code someone said if you have to crack placements then CP is must.So,you have to code in Codechef or Codeforces that time I was so confused.But I knew that my level is zero so,I should go with Geeks for Geeks from where I have to clear my basics,then I will level up.
Generally students directly jump into code chef or codeforces where they can't solve questions then they get demotivited and think coding is not for them I also one of them who thought coding is not for them .but now the whole scenario is changed I started form GFG I have started with basic topics like Array Strings Stack Queue that's how I level up.when I have completed DSA for first time I have faced problems in Trees Recursion when I started sorting there was different types of sorting algorithms when we learn something initially we face many problems, we have to be mentally prepared for this initially, we don't get any algorithms.when you solve a question don't directly jump into solutions first try to solve by yourself ,give at least 30 to 45 minutes. I also give 30 to 45 minutes also one hour for some questions to check that I can solve it by myself or not when I can't solve the question . I read the solutions or see from youtube.
Whiched helped me in my logical thinking. keep one thing in your mind even if can solve the question you have to see the solution for different approaches I have also done that during my journey.many times I found optimised solutions which have better time and space complexities Some topics like graphs DP which will be asked for 70% of companies for product based companies maximum questions will be asked from these two topics you should have known-how BFS,DFS works ,dijkstra,prim's,kruskal's algorithm learn the basic algorithms .you can search from GFG or Leet code for basic algorithms I have solved around 600 questions on GFG.my base became so strong now it was time for level up I went to the interviewbit for leveling up.
I have started solving questions level of the questions on interviewbit was high so I got stuck in many questions but it was not like GFG days. In GFG I have faced compile error segmentation fault initially it was demotivating when we can't solve questions you don't have to be demotivated.Just keep going just don't give up then I have solved 300+ questions on interview bit after solving many GFG questions I was making my biggest mistake in DP I have always tried to solve the question from the bottom approach for which I got the answer but don't understand the concepts so I want to tell you whenever you try to solve DP use Top Down approach means try to solve it with recursion then add memory to get the best solution .It will help you in remembering how the question actually works then you can optimise it to the bottom approach after solving on these two platforms I have solved 100 to 150 questions with Top-down approach on Leet Code by this method my concept became strong now I started solving PYQs from inter IIT doc.
I have solved the question of Google Uber Microsoft Through this, my concept became so strong. This is how I have learned DSA. I'm not telling you that you have follow my strategy only. just solve the good questions make your own strategy .dont just jump into high level questions start with basic level just have some belief on you. I have learned DSA from Rabindra Babu Ravula,C++from saurav sukla sir;STL from CPP plus youtube channel and DP from Aditya Varma sir I'm not telling you that I can solve all questions,which is not possible.but you have to give some efforts for solving questions.Just don't give up.I'm also telling you that you are not going to be a best coder in 3 months. it's not possible that one can be ready for product based companies in 3 months minimum it will take 6 months for cracking good companies just do CP if you have interest .you don't need CP for placements.you can crack companies just by doing DSA from GFG interview Bit LEETCODE If you have any doubt just comment it down I will answer it as always.GOOD LUCK for your new journey.