Data Structures & Algorithms Roadmap - What You NEED To Learn

Tech With Tim
3 Mar 202416:21

Summary

TLDRThis video script serves as a comprehensive guide for aspiring software engineers to master data structures and algorithms. It emphasizes the importance of understanding big O notation and time complexity, then delves into various data structures including arrays, linked lists, trees, and graphs. The script also covers essential algorithms like recursion, searching, sorting, and graph traversal, before touching on advanced topics and mathematical foundations. The speaker offers resources and tips for effective learning, aiming to equip viewers with the necessary skills for software engineering roles.

Takeaways

  • 📚 Data structures and algorithms are essential for aspiring software engineers, and the video provides a roadmap for learning them effectively.
  • 🔍 Understanding Big O notation and time complexity analysis is fundamental, as it helps evaluate the efficiency of code and is crucial for mastering data structures and algorithms.
  • 🕒 Time and space complexity are key concepts that should be thoroughly understood, as they are applicable to all areas of data structures and algorithms.
  • 📈 Arrays are the starting point for basic data structures, with a focus on understanding their operations, efficiency, and the differences between dynamic and fixed-sized arrays.
  • 🔗 Linked lists, both singly and doubly, are fundamental data structures where understanding node references, traversal, and operation efficiencies is important.
  • 🔁 Queues and stacks are linear data structures that require knowledge of their specific operations and the efficiency of those operations in different scenarios.
  • 🌳 Trees, including binary trees, binary search trees, and heaps, introduce non-linear data structures with unique properties and traversal methods.
  • 🔍 Graphs are complex data structures with various properties and require understanding of representation methods and traversal techniques.
  • 🔑 Hashing is an important concept for understanding the efficiency of everyday data structures like hash maps.
  • 🤔 Algorithms are categorized into several types, including recursion, searching, sorting, and more advanced ones like divide and conquer, dynamic programming, and backtracking.
  • 🛠️ Recursion, searching algorithms (linear and binary search), sorting algorithms (like merge sort and quicksort), and graph algorithms (depth-first and breadth-first search) are fundamental and should be deeply understood.
  • 📈 Advanced data structures and mathematical topics like tries, B-trees, AVL trees, red-black trees, skip lists, segment trees, Fenwick trees, disjoint sets, and discrete math are optional for those seeking deeper knowledge but are not required for most software engineering roles.

Q & A

  • What is the first and most crucial topic to master when studying data structures and algorithms for software engineering?

    -The first and most crucial topic to master is Big O notation and time complexity analysis, which helps in understanding the efficiency of code and comparing different algorithms.

  • Why is it important to understand time complexity and efficiency when learning about data structures?

    -Understanding time complexity and efficiency is important because it translates to every area of data structures and algorithms, allowing one to choose the most efficient data structure for different types of operations.

  • What are the four main operations typically associated with data structures?

    -The four main operations typically associated with data structures are creating, deleting, inserting, and locating elements.

  • What is the difference between a dynamic array and a fixed size array?

    -A dynamic array can grow in size as needed, whereas a fixed size array has a predetermined number of elements and does not change in size.

  • How does a singly linked list differ from a doubly linked list?

    -A singly linked list allows traversal in one direction, from the head to the tail, while a doubly linked list allows traversal in both directions, with each node having a reference to both the previous and next nodes.

  • What are the advantages of using a queue over a stack in terms of data structure operations?

    -A queue maintains the order of element insertion, which is useful for scenarios where items need to be processed in the order they arrive. A stack follows the Last In, First Out (LIFO) principle, which is beneficial for scenarios like function call stacks or undo mechanisms in applications.

  • What are the three main types of tree traversal methods that should be understood when studying binary trees?

    -The three main types of tree traversal methods are pre-order, in-order, and post-order traversal.

  • What is a binary search tree and how does it differ from a regular binary tree?

    -A binary search tree is a binary tree with the property that the value of each node is greater than all values in its right subtree and less than all values in its left subtree. This differs from a regular binary tree which does not enforce any order among the node values.

  • What are heaps and how do they relate to priority queues?

    -Heaps are special tree-like data structures that satisfy the heap property, where the parent node is either greater than or equal to (in a max heap) or less than or equal to (in a min heap) the values of its children. They are used to implement priority queues efficiently.

  • What are some famous graph algorithms that one should be familiar with?

    -Some famous graph algorithms include Depth-First Search (DFS), Breadth-First Search (BFS), Dijkstra's algorithm, and A* algorithm for pathfinding, as well as Kruskal's and Prim's algorithms for finding minimum spanning trees.

  • What are some sorting algorithms that are fundamental to computer science knowledge?

    -Some fundamental sorting algorithms include Merge Sort, QuickSort, Insertion Sort, Selection Sort, Bubble Sort, and Heap Sort.

  • What are some advanced data structures that can be studied for a deeper understanding of computer science?

    -Some advanced data structures include Tries, B-Trees, AVL Trees, Red-Black Trees, Skip Lists, Segment Trees, Fenwick Trees, and Disjoint Set.

  • What mathematical topics can provide a deeper understanding of data structures and algorithms?

    -Mathematical topics such as Combinatorics, Probability, Discrete Math, and Discrete Structures can provide a deeper understanding of why certain data structures have different time complexities and how to prove the time complexity of algorithms.

Outlines

00:00

📚 Essential Data Structures and Algorithms for Software Engineers

This paragraph introduces the fundamental importance of data structures and algorithms for aspiring software engineers. The speaker outlines a structured approach to learning these topics, emphasizing the importance of understanding big O notation and time complexity analysis. The focus is on evaluating code efficiency and differentiating between linear, exponential, and logarithmic time complexities. The speaker also mentions the availability of a free text-based roadmap in their school community and encourages joining for additional resources.

05:02

🔍 Deep Dive into Time and Space Complexity

The speaker stresses the significance of mastering time and space complexity, which are crucial for understanding the efficiency of different data structures and algorithms. Time complexity is the primary focus, with big O notation being the standard for expressing efficiency. Space complexity, while related, is easier to grasp once time complexity is understood. The paragraph also introduces the basic data structures such as arrays, linked lists, and their variations, highlighting the importance of knowing their operations' efficiencies.

10:05

🌳 Exploring Non-linear Data Structures: Trees and Beyond

This paragraph delves into more complex, non-linear data structures such as trees, binary trees, binary search trees, heaps, and graphs. The speaker discusses the unique properties and operations associated with these structures, including traversal methods and the importance of understanding their time complexities. The paragraph also touches on the concept of priority queues and the application of graphs in various algorithms, setting the stage for more advanced topics.

15:08

🤖 Algorithms and Advanced Data Structures for Mastery

The speaker transitions from data structures to algorithms, starting with recursion and moving through various searching and sorting algorithms. The paragraph covers linear and binary search, different sorting techniques like insertion sort, selection sort, bubble sort, merge sort, heapsort, and quicksort. It also introduces graph algorithms like depth-first search and breadth-first search, as well as pathfinding algorithms like Dijkstra's and A*. The speaker emphasizes the importance of understanding and being able to implement these algorithms, suggesting that they form the backbone of computer science knowledge.

📘 Advanced Topics for the Curious Mind

In this paragraph, the speaker acknowledges that while most individuals may not need to venture into advanced topics, those interested in deepening their understanding can explore advanced data structures like tries, B-trees, AVL trees, red-black trees, skip lists, segment trees, Fenwick trees, and disjoint sets. Additionally, the speaker briefly mentions mathematical topics such as combinatorics, probability, discrete math, and discrete structures, suggesting these as optional but enriching areas of study.

🎓 Wrapping Up the Comprehensive Learning Roadmap

The final paragraph wraps up the video by summarizing the entire roadmap for learning data structures and algorithms. It reiterates the availability of a detailed text-based version in the school community and promotes the speaker's course with Coursera as a comprehensive resource. The speaker encourages viewers to like, subscribe, and prepare for coding interviews with the knowledge gained, while also acknowledging the optional nature of the advanced topics covered.

Mindmap

Keywords

💡Data Structures

Data structures are specialized formats for organizing, storing, and manipulating data. They are fundamental to computer science and software engineering, enabling efficient data handling within programs. In the video, various data structures such as arrays, linked lists, trees, and graphs are discussed, each with unique properties and efficiencies for different operations, emphasizing their importance in mastering time and space complexity.

💡Algorithms

Algorithms are step-by-step procedures to solve problems or perform tasks. They are at the core of computer programming and are essential for software engineers to create efficient and effective code. The script covers a range of algorithms from searching and sorting to more complex graph algorithms, highlighting their significance in optimizing performance and solving computational problems.

💡Big O Notation

Big O notation is a mathematical notation used to describe the upper bound of the time complexity of an algorithm in terms of the size of the input data. It helps in classifying algorithms into categories like linear, logarithmic, or exponential time complexities. The video emphasizes the importance of understanding Big O notation for evaluating the efficiency of code snippets and choosing appropriate data structures and algorithms.

💡Time Complexity

Time complexity refers to the amount of time an algorithm takes to run as a function of the size of the input. It is a critical measure of an algorithm's efficiency. The video script discusses time complexity in the context of different data structures and operations, such as adding, removing, or locating elements, and stresses the need to master this concept for effective software engineering.

💡Space Complexity

Space complexity is a measure of the amount of memory an algorithm uses in relation to the size of the input. It is as important as time complexity when assessing the efficiency of an algorithm. The video briefly mentions space complexity in the context of understanding not just time but also the memory usage of algorithms.

💡Arrays

An array is a data structure that stores a collection of elements, typically of the same type, in a contiguous block of memory. The video discusses arrays, including dynamic and fixed-size arrays, and their operations such as adding, removing, and locating elements, emphasizing the need to understand their time complexities.

💡Linked Lists

A linked list is a linear data structure where each element is a separate object, called a node, containing a reference to the next node in the sequence. The script covers singly and doubly linked lists, explaining how they manage references between nodes and the time complexities associated with their operations.

💡Binary Trees

A binary tree is a hierarchical data structure in which each node has at most two children, referred to as the left and right child. The video explains binary trees, including their properties and traversal methods like pre-order, in-order, and post-order, and their use in organizing data efficiently.

💡Binary Search Trees

A binary search tree (BST) is a binary tree with the property that the value of each node is greater than or equal to any node to its left and less than or equal to any node to its right. The video discusses BSTs as a way to maintain a sorted order of elements, allowing for efficient search, insertion, and deletion operations.

💡Graphs

Graphs are data structures consisting of nodes or vertices connected by edges. They can represent complex relationships and are used in various applications, from social networks to transportation systems. The script covers different types of graphs, such as directed and undirected, and their representations like adjacency lists and matrices, highlighting their importance in advanced computer science.

💡Hashing

Hashing is a technique used to convert a large amount of data into a smaller, fixed-size value, known as a hash code. It is fundamental to hash-based data structures like hash maps, which offer efficient data retrieval. The video mentions hashing in the context of understanding the efficiency of everyday data structures.

💡Recursion

Recursion is a programming technique where a function calls itself to solve smaller instances of the same problem. It is a powerful method used in various algorithms. The video briefly introduces recursion, explaining its components like base and recursive cases, and its application in solving problems through repetitive self-calls.

💡Searching Algorithms

Searching algorithms are used to find specific elements within a data structure. The script mentions linear search, which involves scanning each element sequentially, and binary search, which operates on sorted data and significantly reduces the search space, illustrating the importance of choosing the right algorithm based on data characteristics.

💡Sorting Algorithms

Sorting algorithms rearrange elements in a specific order, typically ascending or descending. The video lists several sorting algorithms, such as insertion sort, selection sort, bubble sort, merge sort, and quicksort, emphasizing the need to understand their time complexities and use cases for efficient data manipulation.

💡Graph Algorithms

Graph algorithms are designed to solve problems related to graph structures, such as finding paths between nodes or determining the connectivity of a graph. The script discusses depth-first search (DFS) and breadth-first search (BFS), which are fundamental for traversing and analyzing graphs, as well as algorithms for finding minimum spanning trees and shortest paths.

💡Dynamic Programming

Dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems and storing the results to avoid redundant computations. It is mentioned in the video as an advanced algorithmic technique, useful for optimization problems where overlapping subproblems occur.

💡Backtracking

Backtracking is an algorithmic technique for solving problems incrementally by trying to build a solution and undoing ('backtracking') the steps if a certain condition is not met. It is briefly mentioned in the script as a type of algorithm that can be applied to problems like the N-Queens puzzle, where it is necessary to explore and abandon potential solutions.

Highlights

Data structures and algorithms are essential for aspiring software engineers.

A roadmap is provided to learn data structures and algorithms in an effective order.

Big O notation and time complexity analysis are fundamental and must be mastered.

Understanding efficiency of code is crucial for evaluating different data structures.

Space complexity is as important as time complexity once the latter is understood.

Basic data structures such as arrays, linked lists, and dynamic arrays are foundational.

Queues and stacks are fundamental data structures with specific use cases and operations.

Binary trees and binary search trees are essential for understanding tree-based data structures.

Heaps and priority queues are important for efficient data management and retrieval.

Graphs introduce non-linear data structures with various properties and representations.

Hashing is a concept crucial for understanding hash maps and their efficiency.

Algorithms are categorized and explained, including recursion, searching, sorting, and graph algorithms.

Recursion involves calling the same function within itself and requires understanding base and recursive cases.

Searching algorithms like linear search and binary search are fundamental for locating elements.

Sorting algorithms such as merge sort and quicksort are key to understanding data organization.

Graph algorithms like depth-first search and breadth-first search are vital for traversing complex structures.

Pathfinding algorithms like Dijkstra's and A* are important for finding the shortest path in graphs.

Advanced data structures like tries, B-trees, and AVL trees are for those looking to deepen their knowledge.

Discrete math and structures provide a deeper understanding but are not necessary for most practitioners.

A comprehensive course with practice exercises and quizzes is available for those seeking a complete learning package.

Transcripts

play00:00

We all know that data structures and algorithms is a must know

play00:03

topic for anyone wanting to become a software engineer.

play00:06

So in this video, I'll break down for you exactly what you need to learn the order

play00:10

in which you should learn it and give you some details

play00:12

on what you should focus on for each individual topic.

play00:15

I'll even share with you

play00:16

some resources and tips to learn this as effectively as possible.

play00:19

Now, if you want a text based version

play00:21

of this road map or something to follow along with, then join my school community.

play00:25

I have it in there completely for free.

play00:27

We have over 8000 members in the school community.

play00:30

You can join for free. The link in the description.

play00:32

I look forward to seeing you there.

play00:34

So let's get right into it with the first thing you absolutely need

play00:37

to master, which is big on notation and time complexity analysis.

play00:41

You need to understand

play00:42

how to look at a piece of code and understand how efficient that code is.

play00:46

Does it run in linear time?

play00:48

Does it run an exponential time?

play00:49

Does it run in logarithmic time?

play00:51

You should understand how to evaluate that

play00:53

and you should know which code is more efficient than others.

play00:56

Now, it's really important that you spend a lot of time in this section

play01:00

and you really get this down.

play01:01

This is not something you can skip.

play01:03

You need to really understand this to the point

play01:05

where I can put any piece of code in front of you

play01:08

and you can tell me what the time complexity of that is.

play01:11

Now, usually we're going to do this in big O notation.

play01:13

It's not going to be harmful to learn about big theta notation

play01:16

and the other types of notation,

play01:18

but oftentimes we're just going to use bigger notation.

play01:20

So as long as you understand that, that's completely fine.

play01:23

Now, the reason we need to know this so deeply is because this is going

play01:27

to really translate to every area of data structures and algorithms.

play01:31

The whole reason we use different data structures is because

play01:34

of the efficiency of them for different types of operations.

play01:37

So if you don't really understand time, complexity and efficiency,

play01:40

it's going to be impossible to master anything else on this list.

play01:43

So please spend a lot of time here.

play01:45

Absolutely. Master this.

play01:47

And while you're looking at time complexity, you can also look at space.

play01:50

Complexity.

play01:51

Now, in my eyes,

play01:52

this is pretty much the same thing just applied to memory in space.

play01:55

It's pretty easy to learn space complexity once you know, time complexity.

play01:59

So get those down.

play02:00

Time, complexity, space, complexity.

play02:02

And then move into the next topic.

play02:04

So now that we're masters of bigger notation and time complexity,

play02:07

it's time to get into our basic data structures.

play02:10

I've got a long list here.

play02:11

Just bear with you. I'm going to go through them one by one.

play02:14

So the first one you're going to want to look at is arrays.

play02:17

Now, you've probably seen an array before, but you may not have really gone

play02:20

into the details and understood the time complexity of various operations.

play02:24

So here are our goals to understand what an array is, how it works,

play02:28

and what the different operations are and their efficiency.

play02:30

So adding an element, removing an element, locating an element, adding an element

play02:35

at the front, adding an element at the back, resizing an array,

play02:38

and then dynamic arrays versus fixed sized arrays.

play02:41

So a dynamic array is one that can grow in size,

play02:44

whereas a fixed size array is one that only has a certain number of elements.

play02:48

Here, our goal should be to understand how rays work behind the scenes

play02:51

and how we grow or shrink them, depending on the operations were performing.

play02:55

Now, once we look at arrays, we want to start looking at linked lists.

play02:59

Now, these are probably the most basic type of data structure,

play03:01

and we want to understand how we create references between different nodes,

play03:05

how we traverse the links list, how we add an element, how we remove an

play03:09

element, and all of the different time complexity of those operations.

play03:13

One thing you're going to see here is that for all of these different data

play03:16

structures, what we're focused on is four main operations

play03:20

creating, deleting, inserting and locating.

play03:23

In some cases there's a few more, but generally

play03:25

speaking, those are the four things we do with the data structure,

play03:28

and we want to know

play03:29

which data structures are best at what different type of operation.

play03:33

So that's why we're really focusing on the efficiency of those operations.

play03:36

So we know later on which data structure we should pick

play03:40

for a specific problem that we're encountering.

play03:43

Okay.

play03:43

So once we learn singly linked lists, we're now going to learn double linked

play03:46

lists.

play03:47

Now, this is a linked list that goes in both directions, pretty much.

play03:50

You can look it up.

play03:51

You'll see exactly how it works.

play03:52

And same thing with a single linked list.

play03:54

We're going to want to understand how to add, remove, find

play03:58

and when we would use double versus single what the advantages are.

play04:01

Once we look at that, we're going to start getting into Qs and Stacks.

play04:05

Now, A is a data structure that will maintain the order

play04:08

in which elements are inserted.

play04:10

This is just like a queue where you add line up right in a line that is a queue.

play04:14

So again, we want to understand how we add, how

play04:16

we delete, how we find an element, how we create a queue.

play04:20

And here we'll also want to look at

play04:21

how we implement a queue because the implementation

play04:24

is going to dictate the time complexity of various different operations.

play04:28

Now, after we learn about queue,

play04:29

of course we're going to be learning about a stack.

play04:31

A stack is just like a stack of plates.

play04:33

Whatever goes on the top is the first thing to come off.

play04:35

So the first element on is actually the last element off,

play04:39

and the last element on is the first element out.

play04:42

We have life the last in, first out.

play04:45

That's kind of a common term here

play04:46

when we're talking about something like a stack.

play04:48

There's a way to say it in reverse as well.

play04:50

But a stack is another data structure we're going to want to learn again,

play04:53

adding elements, removing elements, how we implement it,

play04:56

and when we would use a stack versus using something like a queue.

play04:59

So now that we've learned about those, we're going to start getting into trees.

play05:01

Now here's where it gets a little bit more complex

play05:04

and we start to see some data structures that aren't quite as familiar

play05:07

because they're not linear.

play05:09

They're in a tree like structure now.

play05:10

So this is where you'll start to see kind of some new concepts,

play05:13

but it gets pretty interesting.

play05:14

So the first thing we're going to look at is just basic trees,

play05:17

and we're going to specifically look at a binary tree.

play05:19

A binary tree is a tree in which one node can have at most two different children.

play05:24

And with the binary tree,

play05:25

we have a lot of different properties and ways to traverse the tree

play05:29

to add an element to the tree, to remove an element to the tree to locate.

play05:33

And if if an element exists or to create the tree when we're starting out.

play05:36

So we're going to want to look at all of those different things.

play05:39

And when we start looking at trees,

play05:41

there's going to be three traverses that we're going to want to focus on

play05:44

the post order, the pre order and the in order traversal.

play05:47

These are very important to understand.

play05:49

So make sure you spend some time once you've learned

play05:51

about the basics of trees, to know how those reversals work.

play05:55

Now we're also going to want to learn about some different tree properties

play05:58

like the height of a tree, the depth of a node within the tree.

play06:02

We're going to want to understand what a complete binary tree is,

play06:05

what a full binary tree is, what a perfect binary tree is.

play06:08

There's all these different properties of trees,

play06:10

and even though you don't need to memorize

play06:11

all of them, you should have at least seen them once.

play06:14

So make sure you go through all of those different core concepts.

play06:16

There's probably some I'm forgetting here,

play06:18

but those are the main ones I can think of off the top of my head.

play06:21

Now, once we've learned about binary trees, we're going to start learning

play06:24

about binary search trees.

play06:25

Now, binary search tree is very similar to what we learned before,

play06:29

but in this case we use the tree to more efficiently locate elements

play06:32

and we sought them or saw them story in more of a sorted order.

play06:36

Now, it's not a linear sorted order like we would have seen before,

play06:39

but with the binary search tree, all of the children to

play06:42

the right of a parent are going to have a greater than value.

play06:45

And all of the children

play06:46

to the left of the parent are going to have a value less than that.

play06:49

Now, this allows us to create

play06:50

an efficient data structure for locating different elements,

play06:53

but there's some other properties of this that we're going to want to understand,

play06:56

like how do we insert an element in a binary search tree?

play06:59

How do we remove an element, how do we locating element, etc..

play07:03

So look at both regular binary trees and then binary search trees.

play07:07

Once we look at binary search trees, we're going to start looking at heaps.

play07:10

Now, heaps are similar to binary

play07:12

search trees, but they work a little bit different.

play07:14

And again, we're focusing on those main operations like creating

play07:17

a heap, inserting, deleting, locating, etc..

play07:21

Now with the heap, we're going to want to look at a min heap

play07:23

and a maxy and we'll try to see how a heap can actually work.

play07:26

Is something known as a priority queue, which is another data structure

play07:30

that we should kind of learn about in tangent with the heap.

play07:33

Now, once we learn about heaps, we're going to move on to graphs

play07:36

that when we talk about graphs, we're going to be talking about

play07:38

nodes or vertices that are connected with different edges.

play07:41

We have so many different properties of graphs, like directed graphs,

play07:44

undirected graphs, weighted graphs, unweighted graphs,

play07:47

and we need to understand how to represent graphs and how to traverse them

play07:50

so we could have adjacency lists, adjacency matrices, edge lists.

play07:54

There's all different types of properties of graphs.

play07:56

And here's where you can get into graph theory and get really, really complicated.

play08:00

Start talking about cycles within graphs and all kinds of fancy algorithms.

play08:04

You don't need to get too crazy here, but you want to understand what a graph is,

play08:07

how you represent a graph, the different types of representations

play08:11

and which is advantageous in which scenario.

play08:13

Now, once we understand graphs

play08:15

and we get the terminology out of the way, we're going to start looking at hashing.

play08:18

Now, hashing is not overly complex.

play08:20

This isn't something I would spend a ton of time on,

play08:23

but we want to understand what a hash

play08:25

is, how we hash and how we use this for something like a hash map.

play08:28

That way we understand how some data structures that we use every single day

play08:32

actually operate and the efficiency of those data structures.

play08:36

So that wraps up our basic data structures.

play08:38

I know this is overwhelming and it's a lot of content,

play08:41

but this really is what you need to know.

play08:43

Just as the basics in data structures and algorithms.

play08:46

And now we're going to get into the algorithms.

play08:48

All right.

play08:49

So now we're going to start diving into algorithms.

play08:51

But I do want to let you know that if you do want to learn all of this

play08:54

and you actually want some practice

play08:56

and ways to evaluate if you actually know what you're learning,

play08:59

then you can check out my course with course Careers.

play09:02

This is a full software development course.

play09:03

It doesn't just teach data structures and algorithms,

play09:06

but it has an entire section dedicated to this

play09:08

where I break down all of the topics that I'm listening to you right now.

play09:11

I explain everything that you need to know.

play09:14

And not only that, we give you a bunch of practice exercises, quizzes, etc.

play09:18

so you actually know if you're

play09:19

ingesting this content and understanding what the heck we're talking about,

play09:23

you can check it out from the link in the description.

play09:25

With that said, though, let's get into our algorithms.

play09:28

Okay, So now we've learned our data structures.

play09:30

We're going to start talking about algorithms.

play09:32

Now, these algorithms will use the various data structures that we talked about,

play09:36

and a lot of them are just famous computer

play09:38

science algorithms that you should be aware of

play09:40

and you should implement or write once in your life.

play09:43

So let's start going through now there's kind of

play09:45

different categories of algorithms, so bear with me as I walk through them.

play09:49

The first type of algorithm we're going to want to learn about is recursion.

play09:53

And recursion is simply a recursion is simply.

play09:55

Now recursion is simply.

play09:57

If you got that horrible computer science joke, leave a comment down below.

play10:00

But recursion is simply calling the same function from the same function,

play10:04

so it's pretty much doing the same thing over and over.

play10:07

Well, we create a recursive algorithm.

play10:09

We have something known as a base case in a recursive case.

play10:12

You can learn more about it.

play10:13

This is not going to be an entire video on recursion.

play10:16

Next, we have searching algorithms.

play10:18

Now, these you may have already seen at this point, but a searching algorithm

play10:21

is something we use to locate something within a data structure.

play10:25

So we have a linear search, which means simply scanning something

play10:28

from left to right and trying to find an element.

play10:30

And then we have something like binary search, which is a way

play10:33

that we can sort or source search very quickly within a sorted list.

play10:38

You want to learn both of those and you should know how to implement them

play10:40

and write them out.

play10:42

Next, we have sorting algorithms.

play10:43

Now sorting is a very famous thing in computer science.

play10:46

Obviously we need to do this all the time.

play10:48

So it's important to understand

play10:50

these different algorithms and the efficiency of each of them

play10:53

within sorting algorithms. We have so many different options.

play10:55

I'm going to list a few here and if you follow

play10:58

any reputable curriculum, then these will probably all be taught.

play11:01

So we have insertion, sort, selection, sort bubbles,

play11:03

sort merge, sort heaps, sort quicksort.

play11:07

There's probably a few other things that I'm forgetting,

play11:08

but those are the main famous ones that you want to be aware of.

play11:11

You don't necessarily need to write all of these out.

play11:13

We should understand how they work and what sorting algorithm is

play11:17

used as the default implementation for a programing language.

play11:20

You Right.

play11:21

So next we're moving on to graph algorithms.

play11:23

Now, at this point,

play11:24

we really want to focus on depth first, search and breath first search

play11:27

and make sure we can implement those and really understand how they work.

play11:31

So with depth first search, we're using a stack with breath for search.

play11:34

We're using a queue.

play11:35

We want to really make sure we're good at these

play11:37

because these are very famous algorithms.

play11:39

They're used in a ton of different problems

play11:41

now, as well as that, I'd recommend looking at crew schools algorithm

play11:44

and primes algorithm for finding a minimum spanning tree.

play11:47

These aren't as important, but they are pretty famous algorithms

play11:51

and they can show up in

play11:52

some more complicated data structures and algorithms type questions.

play11:56

Moving on from our graph algorithms, we have our pathfinding algorithms.

play12:00

Now, these are quite a bit different.

play12:01

They are a more efficient way to find the shortest path within a graph.

play12:05

In this case, we have the ACE,

play12:06

our Pathfinding algorithm, and Dijkstra's algorithm.

play12:09

Start with Dijkstra's. Then you can look at a star.

play12:11

A star is

play12:12

just a slight variation of Dijkstra's, so it's not that much more difficult

play12:16

to learn.

play12:16

And it can always be fun to write programs that actually model these path.

play12:21

Finding algorithms.

play12:21

In fact, I found those are really fun when I first learned them.

play12:24

So maybe here you want to take a break and actually write out

play12:26

a data structure is an algorithm visualizer

play12:28

where you kind of do a pathfinding algorithm. Just an idea.

play12:30

Anyways, let's move on to the next algorithms.

play12:33

I'm going to go a little bit faster here.

play12:34

These are important to understand, but you can really only learn them

play12:37

when you apply them to a specific problem.

play12:40

So as much as you can look at the theory, these are going to be more ones

play12:43

you focus on when you see a problem that requires this type of solution.

play12:46

Now, here we have grading algorithms.

play12:48

We have divide and conquer algorithms.

play12:51

This kind of a general classification, but something to be aware of.

play12:54

We have dynamic programing and we have back tracking algorithms.

play12:58

Now, again, kind of four categories of algorithms

play13:01

that are hard to learn theoretically and that are easier

play13:03

when you actually apply them into a problem.

play13:06

Okay.

play13:06

So that wraps up the algorithm section.

play13:08

Now, it's worth noting that there are tons of different algorithms you can learn,

play13:12

but these are the most famous and if I was going to name the few that

play13:15

you should really focus on, they would be the following.

play13:18

So linear search, binary search

play13:22

depth first search breath, first search.

play13:25

And then you want to understand

play13:26

sorting algorithms like the merge sort and the QuickSort algorithm.

play13:30

If you only had to learn a few algorithms on this list, those would be the few

play13:33

I would really, really dive into and make sure you fully understand.

play13:37

The reason for that is these are the most commonly used,

play13:39

and I would say

play13:40

they're the most fundamental in terms of computer science knowledge.

play13:43

The other ones are important, don't get me wrong,

play13:45

but if you're only going to learn a few of them,

play13:47

really focus on those specific few.

play13:49

So at this point, for 95% of you, you have all the knowledge

play13:52

you need to really start practicing this.

play13:55

And if you do have something like a coding interview, start preparing for

play13:58

that interview by doing data structures and algorithm style questions.

play14:01

However, if you really want to get to the next level,

play14:04

there are some more advanced data structures

play14:06

and some math you may want to learn, which I'm going to share with you now.

play14:10

Now, I just want to emphasize that for most of you, you do not need to know this.

play14:13

Even myself, I have not mastered these different data structures,

play14:16

so I'm just going to quickly run through a list of the advanced ones.

play14:19

Again, there are completely optional

play14:21

that you may want to look at if you really want to get to the next level.

play14:24

But keep in mind, most of you do not need to know this

play14:27

and you'll be completely fine with what I said before.

play14:29

Okay, so let's get into it.

play14:30

Here we have tries B trees, AVL trees,

play14:34

red black trees, skip lists, segment trees, Fenwick tree and the disjoint set.

play14:40

Now there's about a billion other data structures I could share here as well.

play14:43

But these are the more popular advanced ones.

play14:45

Now, if you've learned all of that

play14:47

and you really feel like punishing yourself still,

play14:48

I'll give you a few math topics you can learn.

play14:50

They'll give you a much deeper understanding.

play14:53

But again, this is fully optional.

play14:54

I've actually learned all of this math.

play14:56

I can't remember any of it to this day, but I do remember when I was learning,

play15:00

I was like, okay, that's kind of cool.

play15:02

And now I feel like I understand this a bit better.

play15:04

Anyways, we have common neutron x, we have probability discrete math

play15:08

and discrete structures.

play15:09

Now discrete math in discrete structures are two courses that I took in university.

play15:12

I cannot tell you what I learned.

play15:14

I don't remember most of it, but it was based on like mathematical proofs

play15:18

and actually

play15:18

going through some pretty deep math that kind of allows us to understand why

play15:23

certain data structures have different time complexities,

play15:27

how we actually prove the time, complexity of algorithms, etc.

play15:30

not something I feel like you really need to know.

play15:32

I don't think I've ever used this in real life,

play15:35

but if you do really want to get into the nitty gritty,

play15:37

you can learn those type of mathematical topics.

play15:40

Okay, so let's get a wrap up this complete road map.

play15:44

I just wanted to go through everything you need to learn.

play15:47

So you have one video that has everything and you can kind of reference

play15:50

this if you're looking for a road map where it got it.

play15:53

Keep in mind that you have the text based version in the school community

play15:56

completely free.

play15:57

You can join from the link in the description

play15:59

and if you want a great resource that really has all of this packaged

play16:02

into one place, you can check out my course with course careers.

play16:06

I'll wrap up the video here if you guys enjoy, make sure they like

play16:09

subscribe the channel and I will see you in the next one.

Rate This

5.0 / 5 (0 votes)

Related Tags
Data StructuresAlgorithmsSoftware EngineeringBig O NotationTime ComplexitySpace ComplexityArraysLinked ListsBinary TreesGraph TheoryRecursionSorting Algorithms