The very 1st step you have to do is, choose a programming language, either Java or C++ (or it's up to you which language you want to learn).
📌 Basic Syntax
📌 Data Types
📌 Operators, Variables, functions
📌 Conditional Statement, loops
📌 And the most important OOP(Object-Oriented Programming)
Learn about Collection frameworks if you chose java or STL(Standard Template Library) in C++.
(Or you can skip this as of now).
Now, I can assume that you are a bit familiar with your preferred language.
Like if I say every language has their own unique features/ operations which make them different from others right?
So, my point is that learn the language in such a manner that you don't suffer later.
Suppose, as an example, I am taking Java language here.
So, in this you should know about java…
- Whether it is a OOP or procedural language?
- And if OOP, whether it is fully OOP or not?
- Why java does not support pointers?
- Why java is a platform independent language?
- Some features of it!
I will encourage you when you start leaning in any language to ask these type of question and try to explore more.
🎯 Now, you learned the language, got familiar with syntax and OPP concepts. So, It's time to deep dive into DSA(Data Structure and Algorithm).
You may or may not be familiar with this term DSA so, I am just briefing you here or in the alternative, you can search into google baba:😀
Data Structure and Algorithms play a vital role in solving problems (industrial problem, real scenario problem, etc…)
Basically, DSA is a very crucial thing in a software field as even in real world scenario as well. In day to day life, you may or may not be notice these, or even we don't have any idea related to it…
In your phone contacts, you must be search some contacts by their name, right?
Here, have you thought that how fast your phone shows you the results?? Probably in secs or even less, right!
How it searches so fast even we have more than 200 or 500 contacts, but it gets back with results within secs
You would be thinking about that, which algorithm it uses or which data structure it uses…??
So, before knowing the data structure, you should know about Time and Space complexity because of it you can analyze your algorithm that how fast and how efficient it is (It's very important concept)!
What exactly is it, and why is it so important?
So, here Asymptotic Notation comes into picture...in this you will be learning about How can you make your algorithms more efficient or more optimized by reducing their time and space complexity.
Basically this concept is very, very important, or I can say it is a building block of your DSA.
In this, you would learn about…
- Big-O Notation (Ο) – Big O notation specifically describes worst case scenario.
- Omega Notation (Ω) – Omega(Ω) notation specifically describes best case scenario.
- Theta Notation (θ) – This notation represents the average complexity of an algorithm.
Then learn about
- O(log N)
- O(N log N)
In your phone suppose you opened multiple websites suppose 1, 2, 3, 4 then you tapped in back what you see means in which order the websites appear…
In this way, right!
4 3 2 1 (LIFO) it is the concept of Stack(Which you will be studying in DS)
In day to day life most of you use Google Map right!
Have you ever thought that how easily google find your specified location and get back to you with some results within secs?
(Basically the Graph concept involves here)
Also involves lots of algorithms and logics behind on it.
Now you would have some idea that how important the DSA is!!
So, without any worry, let's get started. Learn the basic Data Structure.
Like 1st know
Types of DS
It is of two Linear and Non-linear
- Linked list
- Hash Table etc…
- Heap etc…
You can learn these from here
Pick those DS one by one and start to learn those.
Now, you can explore or learn Collection frameworks or STL.
🎯 In mean time pick any one of these HackerRank, HackerEarth, Leetcode, Codechef platform for solving the problems and test your understanding on those topics. I will suggest you that just complete one topic in DSA and try to solve some questions(solve topic wise). In this way, you will get more productive results to grasp the concept!
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Count Sort etc…
- Linear Search O(N)
- Binary Search O(log N)
(Grasp the concept very clearly)
It is a technique in which the function call itself again and again until the base case occurs.
It is itself a recursion, but here it has some additional conditions which makes it more efficient.
Backtracking is an algorithmic-technique for solving problems recursively by trying to build a solution incrementally, one piece at a time, removing those solutions that fail to satisfy the constraints of the problem at any point of time (by time, here, is referred to the time elapsed till reaching any level of the search tree).
Some standard problems
- Sudoku Solver Problem
- Rat In Maze
- Combination sum, Combination Sum II, Combination Sum III
- N Queen Problem
Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. So the problems where choosing locally optimal also leads to global solution are best fit for Greedy.
For example, consider the Fractional Knapsack Problem.
👩🏫 Check it here
DP = Recursion + some memory
It has two approach:
- Memoization (Top down 👇)
- Tabulation (Bottom Up ☝)
- AND (&)
- OR (|)
- XOR (^)
- NOT (~)
- Left Shift (<<)
- Right Shift(>>)
- Segment Tree
- Suffix Tree,
- Suffix Array,
- Advance Graph Theory
Now, it's time to solve problems as much as you can:)
(Practice Makes Man perfect)
Be consistent practicing, initially you will be facing difficulty to solve and even understand the logic by seeing the solution as well. These things are common, it happens to everyone. Just do and don't give up.
(You will be master if you practice 😊)
Participate in contest if you want to test yourself or also interested in CP(Competitive Programming), give it try.
Otherwise, you are good enough for interview if you practice by yourself without giving contest as well!
- While solving problems if you don't come up with solution with spending at most 1 hour, I will suggest you leave that question as for that time no need to spend more time on that!
- Try that question another day or some days later. If still stuck, then you can refer to some editorials or hints.
- One thing is very important is that suppose you successfully solved some questions 😀. Congratulations, but still I will suggest going to discussion and see other's solution as well. It will be more insightful, and you can get to know different approaches.
- And suppose you are in that situation that you can't solve the problem or even seeing the solution, you are unable to think that logic which are used in the solution. So, don't be panic and don't depress. Just dry run the solution, it really helps(Personally it helps me a lot 😊).
- If still you are thinking that the concept is not so much clear then try to write on paper what you understand the concept via dry running! (Also, you can refer to video lectures).
- Algorithm Part I
- Algorithm Part II
- Durga Software Youtube Channel
- Pepcoding Youtube Channel
- Aditya Verma Youtube Channel
- Techdose Youtube Channel
- Tech You Forword
- Rachit Jain
- Geeks for Geeks
- Code for Cause
- Code with Harry
- Apni kaksha
- Neso Academy
I hope it helps you 😊