How to start DSA from scratch? Important Topics for Placements? Language to choose? DSA Syllabus A-Z

Riddhi Dutta
14 Dec 202221:38

Summary

TLDRThis video script offers a comprehensive guide for beginners on how to master Data Structures and Algorithms (DSA) to excel in top product-based company interviews. It recommends learning languages like C++, Python, or Java, focusing on core concepts and libraries. The script outlines a structured learning path, starting from basics like arrays and linked lists to advanced topics like dynamic programming and graphs, emphasizing the importance of recursion and practical problem-solving. It also encourages viewers to watch related videos for in-depth understanding and problem types.

Takeaways

  • πŸ“š Start with a structured approach to learning Data Structures and Algorithms (DSA) to prepare for interviews at top product-based companies.
  • πŸ” Choose a programming language wisely; C++, Python, and Java are recommended due to their prevalence and library support.
  • πŸ› οΈ Master the basics of your chosen language, including data types, control flow, functions, and understanding of common data structures.
  • πŸ”‘ Understand the importance of libraries for efficient coding during interviews, as they provide built-in functionalities for complex data structures.
  • πŸ” Begin with fundamental topics like linear search, binary search, and basic sorting algorithms to build a strong foundation in DSA.
  • πŸ“ˆ Learn about time and space complexity, and the concept of asymptotic analysis, which are crucial for understanding the efficiency of algorithms.
  • πŸ”— Grasp the implementation and usage of various data structures such as linked lists, stacks, queues, and their respective problems in interviews.
  • 🌐 Diving into advanced topics like hash maps, recursion, and dynamic programming requires a solid understanding of earlier concepts for easier comprehension.
  • πŸ“‰ Tackle graph problems last as they often involve a combination of multiple DSA concepts and are considered advanced.
  • πŸ“ Practice is key; solve a variety of problems for each topic using resources like LeetCode, GeeksforGeeks, and online forums.
  • πŸ“ˆ Follow a logical order of topics, starting from basic to advanced, and ensure to revisit and reinforce concepts as you progress.

Q & A

  • What are the main challenges people face when learning Data Structures and Algorithms (DSA)?

    -People often struggle with DSA because they lack a structured approach and the order in which they should learn the topics. This can lead to confusion, especially when encountering complex problems without a foundational understanding of simpler concepts.

  • Which programming languages are recommended for solving DSA problems?

    -The recommended programming languages for solving DSA problems are C++, Python, and Java. These languages are widely known and have extensive libraries, making them suitable for coding interviews.

  • Why are libraries important when choosing a programming language for DSA?

    -Libraries provide built-in data structures and functions that can simplify problem-solving. They reduce the need to write complex code from scratch, allowing interviewers to focus on the algorithmic approach rather than implementation details.

  • What basic concepts should one learn in a programming language before starting with DSA?

    -Basic concepts include data types, operators, control flow statements, loops, functions, recursion, arrays, strings, pointers and references, structures or classes, preprocessor directives, bitwise operators, and basic exception handling.

  • Why is it beneficial to implement data structures like stacks and queues from scratch before using libraries?

    -Implementing data structures from scratch helps in understanding their internal workings and how they can be used to optimize algorithms. This foundational knowledge is crucial for appreciating their utility in solving DSA problems.

  • What are the key topics covered in the script for learning DSA?

    -The key topics include linear search, binary search, sorting algorithms (bubble sort, insertion sort), linked lists, stacks, queues, hashing, prefix sums, sliding windows, two-pointer techniques, cyclic sorting, recursion, quicksort, mergesort, backtracking, trees, heaps, priority queues, intervals, and dynamic programming.

  • Why is recursion considered a foundational concept for understanding dynamic programming?

    -Recursion is foundational for dynamic programming because it helps in breaking down problems into smaller subproblems. Understanding recursive relationships is crucial for formulating recursive equations, which are the basis for dynamic programming solutions.

  • What is the recommended approach for learning about binary search and its variations?

    -The recommended approach is to first understand the basic concept of binary search, then learn about its variations and applications in solving modified binary search problems. It's also important to understand the concepts of upper bound and lower bound.

  • How does the script suggest learning about linked lists?

    -The script suggests starting with the basics of linked lists, understanding why they are used, and then implementing different types of linked lists such as singly linked list, singly circular linked list, doubly linked list, and doubly circular linked list. After implementation, solving problems related to linked lists is recommended.

  • What is the significance of learning trees in the context of DSA?

    -Trees are significant in DSA as they are fundamental data structures used in various algorithms and applications. Understanding binary trees, binary search trees, AVL trees, and B+ trees, along with their implementations, is crucial for solving complex DSA problems.

Outlines

00:00

πŸ“š Introduction to DSA Learning Structure

The speaker introduces the common questions and struggles faced by individuals learning Data Structures and Algorithms (DSA) for product-based company interviews. They emphasize the lack of a structured learning path as a key issue and propose to provide a clear learning structure and order for topics in this video. The speaker also mentions the abundance of free resources available but the need for a systematic approach to learning DSA, especially for beginners with no prior programming knowledge. They outline the plan to cover the best programming languages for DSA, essential topics within those languages, and the necessary DSA topics to master, concluding with a call to watch the video in its entirety for the most comprehensive guide available.

05:01

πŸ” Choosing the Right Programming Language for DSA

The paragraph discusses the importance of selecting an appropriate programming language for DSA problems, suggesting C++, Python, or Java due to their prevalence in interviews and the availability of libraries that simplify complex data structures. The speaker advises against using less common languages due to potential syntactical overheads in interviews. They also list the basic language concepts that should be mastered, such as data types, control flow statements, functions, and understanding of classes or structures, before delving into DSA topics. The paragraph concludes with encouragement to learn these basics thoroughly to facilitate easier implementation of DSA concepts.

10:01

πŸ”‘ Fundamental DSA Concepts and Problem-Solving Approach

The speaker outlines the fundamental DSA topics that should be learned, starting with basic searching and sorting algorithms like linear search, binary search, bubble sort, and insertion sort. They introduce the concept of asymptotic analysis and the use of comparators for custom sorting. The paragraph then delves into more complex data structures such as linked lists, stacks, and queues, emphasizing the importance of understanding their use cases and implementing them from scratch before solving related problems. The speaker advocates for a learning approach that involves first understanding and implementing a data structure, then applying it to solve problems, which solidifies understanding and appreciates the benefits of each data structure in optimizing algorithms.

15:03

🌐 Advanced DSA Topics and Their Relevance in Interviews

This section covers more advanced DSA topics, including hash maps, prefix sums, sliding windows, two-pointer techniques, and cyclic sorting. The speaker highlights the importance of understanding the internal implementation of hash maps and the necessity of learning specific problems associated with each topic. They also discuss the significance of recursion in solving complex problems and optimizing algorithms like quicksort and mergesort. The paragraph concludes by emphasizing the importance of learning recursion before moving on to dynamic programming, as it forms a foundational skill for understanding and solving advanced problems.

20:04

🌳 In-Depth Exploration of Trees, Dynamic Programming, and Graphs

The speaker provides a comprehensive guide to learning trees, dynamic programming, and graphs, which are critical for DSA interviews. They discuss the necessity of understanding different types of trees, such as binary, binary search, AVL, and B-trees, and the importance of implementing binary trees and binary search trees from scratch. The paragraph also delves into dynamic programming, emphasizing the need for a strong recursion foundation and the exploration of memoization and various DP patterns. Finally, the speaker covers graphs in detail, mentioning the importance of understanding different graph problems and patterns, and refers to previous videos for an in-depth understanding of these topics.

🎯 Conclusion and Final Recommendations for DSA Learning

In conclusion, the speaker summarizes the importance of the topics covered in the video and provides a structured syllabus for DSA interview preparation. They encourage viewers to learn the topics in the provided order and solve important problems from each area to excel in DSA interviews. The paragraph ends with a call to action for viewers to like, subscribe, and share the video to help others understand the DSA learning process. The speaker promises to continue providing valuable content to assist in learning DSA and ends the video with well-wishes for the viewers.

Mindmap

Keywords

πŸ’‘DSA

DSA stands for Data Structures and Algorithms. It is a fundamental area of computer science that focuses on the efficient organization, management, and manipulation of data. In the context of the video, DSA is crucial for cracking interviews at top product-based companies. The script emphasizes the importance of learning DSA to solve complex problems in software engineering.

πŸ’‘Recursion

Recursion is a programming technique where a function calls itself to solve smaller instances of a problem. It is a key concept in the video, as it is used in various algorithms like quicksort and mergesort. The script suggests that understanding recursion is essential for mastering more advanced topics like dynamic programming.

πŸ’‘Dynamic Programming

Dynamic Programming (DP) is a method for solving complex problems by breaking them down into simpler subproblems and storing the results of these subproblems to avoid redundant computations. The video highlights the importance of DP in solving optimization problems and suggests that a strong foundation in recursion is necessary for effective learning of DP.

πŸ’‘Data Structures

Data Structures are specialized formats for organizing, processing, retrieving, and storing data. The video discusses various data structures like arrays, linked lists, stacks, queues, hash maps, trees, and graphs, emphasizing their role in optimizing algorithms and their importance in technical interviews.

πŸ’‘Algorithms

Algorithms are step-by-step procedures for calculations and data processing. The script covers several algorithms, including linear search, binary search, sorting algorithms (bubble sort, insertion sort), and advanced topics like quicksort and mergesort. These algorithms are essential for solving DSA problems.

πŸ’‘Programming Languages

The video recommends learning DSA in programming languages like C++, Python, or Java. These languages are popular choices due to their widespread use in the industry and the availability of libraries that can aid in implementing complex data structures and algorithms.

πŸ’‘Stack

A stack is a linear data structure that follows the Last In First Out (LIFO) principle. The video discusses implementing a stack using an array or a linked list and solving stack-related problems, which helps in understanding how data structures can optimize algorithms.

πŸ’‘Queue

A queue is a linear data structure that follows the First In First Out (FIFO) principle. The script mentions implementing queues from scratch and solving queue-related problems, such as the sliding window maximum problem, which is commonly asked in interviews.

πŸ’‘Hashing

Hashing is a technique used to map data of arbitrary size to fixed-size values for quick retrieval. The video emphasizes learning about hash maps and their internal implementation, which is crucial for understanding how to handle large datasets efficiently.

πŸ’‘Graphs

Graphs are data structures that consist of a set of vertices and a set of edges connecting these vertices. The script highlights the importance of learning about graphs for solving complex problems in DSA, such as finding the shortest path or detecting cycles.

πŸ’‘Backtracking

Backtracking is a form of recursion used to solve problems that involve searching through a set of possibilities. The video suggests that mastering backtracking is essential for solving complex combinatorial problems, which are often encountered in DSA interviews.

Highlights

The importance of learning the right order and structure of topics for Data Structures and Algorithms (DSA) to succeed in top product-based company interviews.

The availability of free resources for DSA on platforms like YouTube, yet the struggle many face due to a lack of structured learning.

The recommendation to start with programming languages like C++, Python, or Java for DSA problems due to their prevalence and library support.

The necessity to understand basic language concepts such as data types, control flow, functions, and arrays before diving into DSA.

The significance of learning search algorithms like linear search and binary search, along with their complexities and applications.

The basics of sorting algorithms, including bubble sort and insertion sort, and the introduction to asymptotic analysis.

The approach to learning linked lists by implementing different types and solving classic problems like cycle detection.

The importance of implementing and understanding stacks and queues from scratch before utilizing their library counterparts.

The role of hashing with hash maps and the need to know their internal implementations for technical interviews.

The application of prefix sums, sliding windows, and two-pointer techniques in solving various DSA problems.

The often-overlooked topic of cyclic sorting and its relevance in product-based company interviews.

The necessity to grasp recursion before moving on to more complex topics like quicksort, mergesort, and dynamic programming.

The step-by-step approach to learning trees, including binary trees, binary search trees, and their implementations.

The significance of understanding tries and heaps, along with problems like finding the median from a data stream.

The importance of interval problems and their solutions using tree maps and tree sets.

The comprehensive guide to dynamic programming, including memoization, different types of DP, and problems on trees.

The final and most critical topic for DSA interviews: graphs, including various problems and patterns asked by top companies.

The suggestion to learn advanced topics like strongly connected components and segment trees if time permits.

Transcripts

play00:00

how to start with DSA what are the

play00:02

topics that I should learn to crack DSA

play00:05

interviews in top product based

play00:06

companies what are some of the best

play00:08

programming languages that I should use

play00:10

to solve DSA problems these are some of

play00:13

the very questions that crop up in your

play00:15

mind whenever you're trying to learn DSA

play00:17

or you are trying to crack product based

play00:19

companies there exists tons of resources

play00:21

out there for free on DSA on YouTube and

play00:24

other social media platform but why do

play00:26

you still think that people struggle

play00:28

with DSA a lot because in my opinion

play00:30

they don't know the structure and the

play00:32

order in which they should learn the

play00:34

topics for example let's say a guy

play00:36

doesn't know recursion has no idea about

play00:38

it and suddenly sees a matrix chain

play00:41

multiplication problem being solved with

play00:43

dynamic programming he will be

play00:44

completely at Sea you will find DSA

play00:46

extremely hard and he would think that

play00:48

this is not my cup of tea but that's not

play00:50

the way it should be right that's where

play00:52

probably the paid courses comes into the

play00:53

picture where they gives you the

play00:55

structure and order in which you should

play00:56

follow but in this video I am going to

play00:59

give you exact that in this video I am

play01:02

going to consider that you are a

play01:03

complete Noob you don't know any

play01:06

programming language at all yes no

play01:08

programming language at all and from

play01:10

there I'm going to build things up I'm

play01:12

going to tell you that what are the

play01:13

programming languages that are good

play01:14

enough to solve DSA problems what are

play01:16

the things that you should learn in

play01:18

those programming languages what are the

play01:20

topics that you need to learn in DSA to

play01:22

crack top product based companies be it

play01:24

Google be it Amazon or any product based

play01:26

company out there I'm also going to give

play01:28

you the path the order in which you

play01:30

should learn the topics so do watch this

play01:32

video till the very end I don't think

play01:34

any such video on this topic in such

play01:37

depth has been made on YouTube So Far So

play01:39

guys please ensure that you watch this

play01:41

video till the very end and don't miss

play01:43

out any part because this is going to be

play01:45

a highly informative video so without

play01:47

any further Ado let's get started with

play01:49

this very special episode on DSA before

play01:51

starting off with this video if you

play01:52

haven't checked out my channel yet you

play01:54

can do so after watching this video I

play01:56

post a lot of software engineering

play01:58

content so if you like my content please

play02:00

press the Bell icon And subscribe to my

play02:02

channel that will motivate me a lot okay

play02:04

coming

play02:11

welcome to skip this part and move on to

play02:14

the next chapter right but in case you

play02:16

don't even know a programming language

play02:17

or you are confused that what is the

play02:19

best programming language for you to

play02:20

learn then do watch this section as well

play02:23

first of all DSA has no language you can

play02:27

take any programming language of your

play02:29

choice and 99 of the companies out there

play02:32

in your coding interviews are not going

play02:34

to stop you that hey you have to use

play02:36

only this particular language no in 99

play02:38

percent of the cases it doesn't happen

play02:40

that way however however I would highly

play02:43

recommend you to use either of these

play02:45

three languages C plus plus python or

play02:48

Java the reason behind it is very simple

play02:50

there are two simple reasons right the

play02:52

first reason is you will you might ask

play02:54

that hey can I use C I would say

play02:55

probably not you can use on paper

play02:57

theoretically but the reason I would

play02:59

discourage you to do so is in C you

play03:01

don't get a lot of libraries so what do

play03:03

you mean by libraries libraries you can

play03:05

consider that let's say you want to use

play03:06

a data structure that is that is a very

play03:08

complex data structure like priority you

play03:10

let's say as you okay so now in an

play03:12

interview which is kind of a hard

play03:14

problem based on Project use which the

play03:16

problem itself requires a lot of

play03:17

attention and coding do you again want

play03:19

to start writing priority code Q from

play03:22

scratch that can be abstracted out right

play03:23

and most of the interviewers won't even

play03:25

expect you to write a priority queue

play03:27

quote from scratch right that's where

play03:29

the libraries come in where they would

play03:31

give you an inbuilt priority queue and

play03:33

you can use that though I think you can

play03:34

get libraries in other languages as well

play03:36

but here's where my second argument

play03:38

comes into picture see C plus plus

play03:40

Python and Java 3 very fundamental

play03:42

languages every interviewer out there in

play03:45

the software engineering industry has an

play03:47

idea about these three languages as an

play03:49

idea about the syntaxes of these three

play03:50

languages now let's say you want to go

play03:52

with a fancy language like so if you are

play03:54

free to do so the interviewer won't stop

play03:55

you but there would be an extra overhead

play03:57

in the interview and what would be that

play03:59

the syntactical overheads because the

play04:01

interviewer who hasn't probably worked

play04:03

with swift might have some issues

play04:05

understanding the syntaxes of those

play04:06

languages and there you would have to

play04:09

deal with that extra overhead of also

play04:11

explaining him the syntax apart from the

play04:12

algorithm and the approach and that's

play04:14

why I discourage you to like use any

play04:16

fancy languages in a coding interview

play04:18

and keep it as simple as possible and

play04:20

for that C plus plus Java and python are

play04:22

sometimes semi JavaScript are good

play04:24

enough languages for DSA also if you

play04:25

want to go like let's see you're stuck

play04:27

in a problem and you want to see the

play04:28

coding solution you would find that most

play04:30

of the solutions online are available in

play04:32

either of these three languages right so

play04:33

that is the reason I would suggest that

play04:35

again there is no constraints as such to

play04:37

choose your language but it would be

play04:39

better your life would be much easier if

play04:40

you choose any of these three languages

play04:42

now having said that now what are the

play04:44

things that you need to learn in a

play04:46

language the following are the things

play04:47

that you need to learn whenever you're

play04:49

learning any particular language data

play04:51

types operatives and expressions control

play04:54

flow statements like if else switch for

play04:57

Loops while Loops do while Loops

play04:58

functions and recursive functions just

play05:00

the basics and how do they work Aries

play05:02

1dr is 2D arrays and Matrix strings

play05:05

pointers and references structures or

play05:08

classes whichever depends on whichever

play05:09

language you are picking if it see it's

play05:11

a structure if it's Java it's classes

play05:13

very Basics about preprocessor

play05:15

directives or Imports because you need

play05:17

to import the libraries have a very very

play05:19

basic idea about bitwise operators and

play05:21

masking some very basic store problems

play05:23

an example of that would be let's say an

play05:26

array you're given numbers in pairs but

play05:28

there is only one number which is odd

play05:30

one out find out the number so zor helps

play05:32

you in finding that basic exception

play05:33

handling Concepts and basic debugging

play05:35

skills you don't need to learn any fancy

play05:37

topics like file handling

play05:39

multi-threading or design patterns and

play05:41

stuff like that obviously they are

play05:43

important for your software engineering

play05:44

but in terms of DSA they are not really

play05:47

important so these are the language

play05:48

specific things that you need to learn

play05:50

before you get started with DSA if you

play05:53

don't know these things you would have a

play05:55

tough time in implementing your thought

play05:57

process so I've seen also this problem

play05:59

as well like many of you think key I am

play06:02

able to come up with the approach but

play06:03

I'm not able to implement it for that

play06:05

you need to have good coding skills you

play06:07

need to have a strong understanding of

play06:08

the language that you're trying to to

play06:10

implement your particular approach in

play06:11

and that is why make sure that you spend

play06:13

a good enough time in learning these

play06:15

things of of the language that you have

play06:17

picked on and you have chose to like

play06:19

solve DSA problems now once you are done

play06:21

with the language part that these topics

play06:24

Here Comes Your next part so we will now

play06:27

go into searching and sorting right so

play06:29

we will start with linear search like

play06:31

what basically is linear search will

play06:33

implement it we will then look at by

play06:35

research and how is it a better version

play06:37

of linear search and when and how can we

play06:39

use it we will now look at two sorting

play06:41

algorithms very Basics one bubble sort

play06:43

and insertion sort will also learn about

play06:45

the time and space complexity and here

play06:47

you will also first learn about now of

play06:49

the bigger notations the asymptotic

play06:51

analysis and all these things also it

play06:52

would be great if you can learn the

play06:54

concept of custom sorting using

play06:56

comparators over here because you would

play06:58

be getting a lot of such scenarios where

play07:00

you have to use custom sorting using

play07:01

comparators whenever you're solving a

play07:03

DSA problem now since you have already

play07:05

learned the basics of my research we can

play07:07

probably go a bit deep into the binary

play07:09

search where we will start solving

play07:10

problems on Modified by research which

play07:12

are actually asked in DSA interviews

play07:14

before doing that you have to learn the

play07:15

concept of upper bound and lower bound

play07:17

now I have made a detailed video on what

play07:20

are the types of patterns that exist in

play07:22

by research in that video I have talked

play07:24

about that what are the different binary

play07:25

search problems that you get asked in

play07:27

DSA interviews so I am not going to dive

play07:29

too much deep into my research because

play07:31

I've already made a detailed video on it

play07:33

so I will attach the link in the

play07:34

description down below so after this

play07:35

video is done whenever you're trying to

play07:37

pick up the binary search topic do go

play07:39

and check out that video I've covered

play07:40

all the different types of problems that

play07:42

exist in my research in that very video

play07:44

also once you have comfortable

play07:46

implementing by research also learn

play07:48

about the functions the libraries that

play07:49

exist for binary search if you are

play07:52

learning C plus plus then that

play07:53

corresponding Library would be sdl if

play07:55

you're learning Java then that would be

play07:56

collection framework but again most of

play07:58

the time you have to implement this

play08:00

upper bound and lower bound functions on

play08:02

your own I don't think the interval

play08:04

would really allow you to you know use

play08:06

these functions or use libraries for

play08:07

this function for that is a by research

play08:09

functions the next topic is linked list

play08:11

so how would you learn a linked list

play08:13

right now I will tell you the exact way

play08:14

in which I learned and which worked for

play08:16

me so first start like with the

play08:18

obviously with the basics of linked list

play08:20

why is it used and how is it different

play08:21

from Aries learn about a little bit

play08:23

about the theory and then jump into

play08:25

implementing these four types of linked

play08:28

lists first one is the singly linked

play08:30

list second one is the singly circular

play08:31

linked list third one is the W linked

play08:33

list and the fourth one is doubly

play08:35

circular link list once you are

play08:37

comfortable in these implementations

play08:38

right once you understand the edge cases

play08:41

that can be involved here then try to

play08:43

solve problems on the very very famous

play08:46

linked list topics such as linked list

play08:48

problems which uses first and slow

play08:50

pointers like detecting a cycle in a

play08:52

linked list or let's say intersection of

play08:54

two linked list which is again A

play08:55

variation of linked list problems so

play08:57

basically solve the various types of

play08:58

problems on linked lists that are asked

play09:00

induced interviews again uh this video

play09:02

is not on the types of problems that

play09:04

exist on a particular topic but rather I

play09:06

am giving you the topics and the order

play09:08

in which you should learn the topics for

play09:10

most of these topics I have a detailed

play09:11

video and separate so you can go and

play09:13

check out those videos I will attach the

play09:14

link in the descriptions down below and

play09:16

for some of the topics which I haven't

play09:18

created like let's say for link list I

play09:19

haven't even jotted down the problems

play09:20

here if you want uh such a video please

play09:23

feel free to comment down below and I

play09:24

would be more than happy to jot down

play09:25

different types of linked list problems

play09:27

that exist but for now I can tell you

play09:28

that the important problems are you know

play09:30

reversing a link is reversing a linked

play09:32

list in you know groups of K uh nodes

play09:35

and stuff like that next we look into

play09:37

Stacks so we would first understand that

play09:39

why is it used right and first instead

play09:42

of using a stack directly what we would

play09:43

do is you would learn to implement a

play09:45

stack on our own that would really

play09:47

really you know enhance our Basics so

play09:49

first we will Implement a stack using

play09:51

array and then we will Implement a stack

play09:52

using linked list and then we will solve

play09:54

some of the very famous stack problems

play09:56

that are asked in DS interview so you

play09:57

can probably go to these geek squares or

play09:59

go to Google or lead code and search the

play10:01

famous stack problems that are asked

play10:02

this is the best way to learn because

play10:04

here you're first learning about a data

play10:06

structure you're implementing the data

play10:08

structure on your own right and then you

play10:10

solve the problem and whenever you're

play10:12

solving the problem you would like

play10:13

appreciate the fact that how using this

play10:16

particular data structure is helping you

play10:18

to optimize your algorithm right so

play10:20

whenever you're learning Stacks in

play10:21

college you are just asked to implement

play10:22

a stack using an array and Link listen

play10:24

that's it we had no idea that why stack

play10:26

is being used why it's such a weird data

play10:28

structure out there right so whenever

play10:30

after learning these things when you

play10:31

actually go and Implement those problems

play10:34

or the problems uh that Stacks comes

play10:36

into picture right then you would

play10:38

appreciate the very fact that how Stacks

play10:40

help you to optimize your algorithm and

play10:42

this is not just for Stacks is out there

play10:44

for any data structural algorithm and

play10:46

just one thing I would like to point out

play10:47

here DSM means data structure and

play10:49

algorithm so how are these two terms

play10:51

related so a data structure is used to

play10:53

optimize the algorithm that you're using

play10:55

right so in this way it is closely

play10:56

related now when you would be solving

play10:57

stack problems please don't implement

play10:59

the stack on your own that was just for

play11:01

a learning purpose then just uh pick up

play11:04

the corresponding stack uh Library like

play11:07

if you're using C plus plus then in sdl

play11:08

you will have the stack data structure

play11:10

abstracted out and then if you are using

play11:12

Java you will find it in the collection

play11:14

framework after you are done with a

play11:15

little bit of stacks we will jump into

play11:17

queues we'll again understand like where

play11:19

it is used why it is used we'll

play11:20

Implement a queue from scratch using an

play11:22

array and linked list will also

play11:23

Implement a circular queue and also will

play11:25

Implement an double ended queue which is

play11:27

basically array DQ in Java and then we

play11:29

will solve the very famous queue

play11:31

problems like sliding window maximum is

play11:32

a very very commonly asked problems

play11:34

based on queues that is asked in Amazon

play11:36

and top product based companies and

play11:37

again while solving problems don't try

play11:39

to create a queue from scratch use the

play11:41

corresponding Library so again lot of

play11:43

people will tell you that hey before

play11:45

starting off with DSL learn complete

play11:46

stlr learn the complete collection

play11:48

framework I don't suggest you to do so

play11:50

and I that is not the way I learned

play11:51

because if you start if you if you're

play11:53

starting off to learn you know the

play11:55

complete STL or collection framework

play11:57

before even getting started uh with uh

play12:00

like solving DSF problems you would be

play12:01

overwhelmed to say the least because

play12:03

there are so many libraries out there so

play12:05

you are not sure that which one to learn

play12:07

right and then also you would learn and

play12:09

then you forget because you won't get

play12:10

the chance to implement that so I

play12:12

personally feel this is the best way to

play12:13

learn pick a topic right uh understand

play12:16

it then then when you're trying to solve

play12:17

these problems then go and learn that

play12:19

corresponding library that is also stays

play12:21

in your brain because you're using it

play12:22

straight away right and also you don't

play12:24

feel the pressure of learning all of the

play12:26

things at once so this is the this is

play12:28

something that helps me again if you if

play12:29

you feel this is not the right way or if

play12:31

you want to learn all the things at once

play12:33

feel free to go ahead next up is hashing

play12:35

so here we will learn about hash maps

play12:36

and assets or in C plus plus what you

play12:38

call unordered map and unordered sets we

play12:41

will learn about its internal

play12:43

implementation yes we need to know about

play12:45

the internal implementation of a hash

play12:46

map I was asked this question a lot of

play12:48

companies including a very recently I

play12:50

was asked in Goldman stocks what's the

play12:52

interview if you want to check out my

play12:53

interview experiences with Goldman Versa

play12:54

for sd2 uh please go and check out I

play12:56

will attach the link in description down

play12:58

below but yeah you need to know these

play13:00

things you need to understand how equals

play13:01

and hash code comes into the picture

play13:03

also I made a detailed video on what are

play13:04

the important problems that you need to

play13:06

solve in hashing so I will attach the

play13:08

problem list on hashing and in the

play13:09

description down below so do and check

play13:11

it out so after we are done with hashing

play13:12

we need to learn problems on prefix some

play13:15

sliding windows and two pointers in some

play13:18

of the problems in prefix sum and

play13:19

signing window you would anyway find

play13:20

hashing being implemented sometimes you

play13:22

might happen to find a combination of

play13:24

these two problems uh you know

play13:26

implemented so order here can go a

play13:28

little bit you know up and down or you

play13:29

can change the order a little bit it is

play13:31

sometimes is very closely related

play13:32

sometimes it's not so it is fine but

play13:35

overall you can follow this order it is

play13:37

not going to you know cost you that much

play13:38

next a very important topic which many

play13:40

of you miss that is cyclic sorting

play13:42

please go learn that a very famous

play13:43

problem from cyclic sorting is uh

play13:46

finding the first missing positive it is

play13:49

a very very commonly asked question in

play13:50

fact another product based companies the

play13:52

lead code hard tag problem so do one

play13:54

solve the problem and also learn about

play13:55

cyclic sorting again this these are this

play13:58

very minor topics which people Miss then

play14:00

jump into learning recursion give some

play14:02

time for recursion because this is a

play14:04

topic that people kind of find very hard

play14:06

to grasp I have a detailed lecture on

play14:08

recursion uh you can go and check it out

play14:10

or you can follow some other resources

play14:11

as well so again the basic Funda then

play14:16

recursion always says don't try to think

play14:18

too much deep and try to trust yourself

play14:19

problem that you're solving anyway I can

play14:21

again make a video on recursion if you

play14:23

want also when you're learning the

play14:24

question try to solve the subset

play14:25

problems uh the concept of take and not

play14:28

take because this will be very very

play14:29

important whenever you are learning DP

play14:31

and if you can grasp these Concepts and

play14:34

you can write recursive code for these

play14:35

type of problems or especially subset

play14:37

problems it would make your DP Journey a

play14:39

cake work right you won't find DP hard

play14:42

anymore because then it would be just

play14:44

memorizing your States so once you are

play14:46

able to solve this you can now learn

play14:47

quick sort and martial the reason I held

play14:49

quicks on and Mozart uh so far is the

play14:53

reason because the recursion is used in

play14:55

quick sort and Mozart it makes your code

play14:57

very easy and less complicated so that

play15:00

is the reason I have I'm encouraging you

play15:02

to learn quicksort and martial and its

play15:04

complexity analysis after you know

play15:06

recursion now solve a couple of problems

play15:08

based on quick sort like ah top K

play15:10

closest points to origin solve some

play15:13

problems related to merge sort like top

play15:14

cable merge stuffs like that now once

play15:16

you're done with recursion learn

play15:18

backtracking again I made a detailed

play15:20

video on the type of problems of the

play15:22

important problems that you should not

play15:23

miss while solving backtracking so go

play15:24

and check it out and follow that sheet

play15:26

uh it would make your backtracking

play15:28

learning experience really really great

play15:29

now once you are done with backtracking

play15:32

let's jump onto fees now why are we

play15:34

following this order because you see in

play15:36

backtracking we require recursion

play15:38

increase we also require recursion right

play15:40

so what is happening idly over here

play15:42

recursion generally takes a bit of time

play15:44

and when you're solving these problem

play15:46

patterns your recursion concept is also

play15:48

getting strong right so you follow this

play15:50

order and then after trees you get into

play15:51

whenever you get into dynamic

play15:52

programming right by that time your

play15:54

recursion will be really really strong

play15:55

it would have a solid draft but hey okay

play15:57

I am now confident in recursion so

play15:59

dynamic programming won't be that tough

play16:00

for you because when you would be

play16:02

starting with Dynamic program you would

play16:03

find that the like the first step to

play16:05

towards learning that or solving a

play16:07

dynamic programming problem is to find

play16:09

out the request equation once you find

play16:11

out the request recursive equation and

play16:12

you have an understanding about the

play16:13

states your dynamic programming Journey

play16:15

would you like a cake work trust me on

play16:17

this so entries what are the things you

play16:18

need to learn you need to learn about

play16:19

binary trees you need to learn about

play16:21

binary search fees you need to learn

play16:22

about NRA trees you need to learn about

play16:24

AVL trees and B plus fees but just the

play16:27

basic concepts and where they're used

play16:28

you don't need to learn the

play16:30

implementation of evil trees and B plus

play16:31

fees you can skip that also feel free to

play16:34

learn tree maps and presets over here or

play16:36

maybe ordered map on ordered sets in C

play16:38

plus plus which will be again very very

play16:40

important for you to solve the USA

play16:41

problems and again uh Implement binary

play16:44

tree Implement binary search to

play16:45

implement the deletion insertion feature

play16:46

on your own and once you're done with

play16:48

these basic things again I have made a

play16:50

dedicated video on trees where again

play16:53

I've listed down the important problems

play16:54

that you need to solve I've listed on 50

play16:56

problems from trees so if you solve

play16:58

those problems your concept and

play16:59

understanding of three problems for any

play17:01

DSA interview would be really really

play17:02

great so do one check out the video

play17:04

again I will attach the link to the

play17:05

video in description down below next you

play17:07

can solve some tries problems you can

play17:09

learn the try data structure and solve

play17:10

some important problems from tries now

play17:12

next you can learn about heapsort and

play17:15

also along with that priority queues so

play17:16

all capillar problems needed to produce

play17:18

like two heat problems finding medium

play17:20

from a data stream all these problems

play17:21

are very important and also don't forget

play17:23

to implement priority queue on your own

play17:25

in one of the interviews in one of the

play17:27

fan companies I was asked to implement

play17:29

priority queue so yeah don't forget to

play17:31

know the implementation and the time

play17:32

complexity of your gratitude and that

play17:34

again after once you are done with this

play17:35

you go to the problems on intervals

play17:38

again I made a detailed video on the six

play17:39

type of product patterns that exist for

play17:41

Interval problems and there are very

play17:42

very important topic and people tend to

play17:44

miss this topic as well don't do this

play17:46

mistake and for generally for solving

play17:48

interval type of problems you would

play17:50

require tree map and tree set so that is

play17:52

the reason I've covered tree map and

play17:54

preset before again like there are some

play17:56

orders that you that are really

play17:57

important like for like example for

play17:59

dynamic programming you need to have a

play18:00

solid understanding of recursion and for

play18:02

that I've given trees and you know I've

play18:04

given backtracking before DP but there

play18:06

are some traffics which are

play18:07

interchangeable the some orders that are

play18:09

in interchangeable so feel free to do

play18:10

that but again if you just blindly

play18:12

follow this topic that is also fine also

play18:14

some of the topics will be Loosely

play18:16

coupled like in some of the topics let's

play18:18

say in one other problem you might face

play18:20

by research prefix some hashmap

play18:22

everything together that is also

play18:23

possible so don't freak out once you are

play18:25

done with intervals we finally get into

play18:27

dynamic programming I've held this back

play18:29

so far because I wanted a recursion

play18:31

concept to be really really strong by

play18:32

now also since you have done most of the

play18:34

topics we can we will have lot of time

play18:36

to learn DP and also the other pending

play18:38

Advanced topics so for DP again

play18:40

recursion is very important on top of

play18:41

that learn memoization 1ddp 2ddp learn

play18:45

the Matrix and multiplication type

play18:46

pattern go back to the subset type of

play18:48

problems that you saw in recursion and

play18:50

now see if you can implement the DP in

play18:52

it or you can you know optimize those

play18:54

problems using Runway programming by

play18:55

storing the states and also there is one

play18:57

more important topic that is dynamic

play18:59

programming on trees again I've made an

play19:00

uh video on dynamic programming the type

play19:03

of problems that you need to solve in

play19:04

dynamic programming so you can refer

play19:05

that sheet again that sheet you would

play19:06

find in the description down below the

play19:07

next topic and the final topic I'm the

play19:09

most important topic for your DS

play19:11

interview is graphs now I'm not going to

play19:13

spend much of time talking about drafts

play19:15

and what are the things you need to

play19:16

learn because I've already made a

play19:18

detailed video on graphs all the type of

play19:20

problems all the important patterns that

play19:22

exist in graph and whatever is asked in

play19:24

product based companies you I will

play19:26

highly recommend you to go and check out

play19:27

that video on drafts in the description

play19:28

down below also don't forget to check

play19:30

out my graph daily Series where I've

play19:32

taught graphs from scratch which are

play19:33

awesome product based companies so yeah

play19:35

I I really won't you know spend much of

play19:37

time talking about drafts here I've like

play19:39

given it all in that video once you are

play19:42

done you can probably learn some

play19:44

Advanced topics like strongly connected

play19:46

components DP with bit masking segment

play19:48

trees fan victories rolling hash and

play19:50

stuff like that but again they're very

play19:51

very rarely asked into a product with

play19:53

companies if you have time if you're

play19:55

interested you can learn but in most

play19:57

cases you won't be requiring that so all

play19:59

of these 14 topics or 13 topics which

play20:01

I've given so far is going to be

play20:03

important for you and if you know these

play20:05

topics if you follow this order if you

play20:07

solve the important questions from these

play20:08

topics trust me no one no one can stop

play20:12

you from learning the essay and now in

play20:14

this video I didn't Focus much on the

play20:15

fact that for this particular topic what

play20:16

are the different type of problems that

play20:17

exist because again that will be an

play20:18

exhaustive video in itself and I've

play20:20

already made a couple of videos on like

play20:22

individual topics which I've already

play20:23

asked you to check it out and you will

play20:24

find the links in the description down

play20:26

below right the motive of this video was

play20:27

to give you the order the structure and

play20:29

the things that you should learn you can

play20:30

consider it as a DSS syllabus for your

play20:32

product based company interview

play20:33

preparation so yeah if you can learn

play20:35

these topics really well if you can

play20:36

understand and solve these problems on

play20:38

your own trust me no one can stop you

play20:40

from cracking your dream company so if

play20:42

you feel that this content provided some

play20:44

value to you don't forget to smash the

play20:46

like button subscribe to my channel

play20:47

press the Bell icon to motivate me also

play20:49

don't forget to share this video among

play20:51

your friends among the community on

play20:53

every social media platform out there so

play20:55

that it can reach the maximum amount of

play20:57

people and they finally stop asking

play20:59

these questions that how to get started

play21:01

USA how to learn DSA because right now

play21:03

every people out there is probably

play21:04

frustrated answering these same

play21:06

questions again and again and I really

play21:08

don't blame these people to asking these

play21:10

questions as well because they are also

play21:12

kind of confused starting out and come

play21:14

completely at Sea not able to figure out

play21:16

what are the things that they should

play21:17

learn rather what what is the order that

play21:20

they should follow so spread this video

play21:21

so that they stop asking these questions

play21:23

and they also have an idea how to go

play21:25

about learning DSA that's it for the

play21:27

video guys I would continue to provide

play21:28

such valuable content to you guys that

play21:30

actually helps you out I will see you in

play21:32

some other video till then stay safe

play21:36

thank you

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
DSA LearningTech InterviewsProgramming LanguagesData StructuresAlgorithmsInterview PrepC++PythonJavaRecursionDynamic Programming