DATA STRUCTURES you MUST know (as a Software Developer)

The Importance of Understanding Data Structures and Trees in Software Development

There are many different variants of data structures that can be used to solve problems, but some tend to be more useful than others for complicated problems. Two such data structures are graphs and trees. A graph is a collection of nodes and edges that can be thought of as simple components. Nodes are the actual vertices of the graph, and edges are the connections between them. If you were to draw your first rectangle in pre-kinder, each side would represent an edge connecting from one vertex to another, and the node would represent the actual vertex itself.

These nodes can have specific data assigned to them, such as values or labels, which allow us to analyze the graph and understand how different components are connected. For example, we could count the number of edges between two specific nodes or trace paths through the graph. Graphs can also be used to create more complex structures like binary trees, which are useful for solving specific types of problems. Underneath these nodes, we can add additional data, and along the edges, we can also store specific information, such as the length or duration of an edge.

To become a top-notch software developer, it's essential to continuously invest in your education and skills. One of the best resources for learning is Skillshare, an online platform that offers courses on a wide range of topics, including software development. The course "Algorithms and Data Structures in JavaScript" by LucasV is one that I'm currently taking, and I highly recommend it because it covers the fundamentals of how to leverage these data structures and algorithms to build optimal code.

By learning about graphs and trees, we can solve complex problems more efficiently and effectively. For example, Google Maps relies on graph theory to navigate users from point A to point B. It creates nodes and edges to represent roads, intersections, and other geographical features, allowing it to provide us with turn-by-turn directions.

Mastering data structures like graphs and trees is crucial for solving complicated problems in software development. Not only will you be able to pass technical interviews with ease, but you'll also have a solid foundation to tackle more complex challenges. The four data structures that I want to emphasize are graphs, trees, heaps, and linked lists.

To execute and implement these skills, I recommend practicing on platforms like LeetCode Hacker Inc or other coding websites. These resources provide opportunities to practice solving algorithms and data structures problems, which is essential for becoming a top-notch developer. By building a technical skill set and portfolio, you can increase your chances of landing a six-figure job as a software developer.

One resource that I highly recommend is Profit with JavaScript, where we teach you everything from the basics to learning and building real-life applications. By combining this knowledge with data structures like graphs and trees, you'll be able to ace technical interviews and land high-paying jobs. If you enjoyed this video and want to learn more, please give it a like and subscribe to our channel. We also encourage you to hit that bell notification icon so you can stay up-to-date on our latest content.

Finally, I appreciate your attention, and I hope you'll join us in the next article.

"WEBVTTKind: captionsLanguage: enyo what is up guys coach daniel here and today i want to talk to you about why data structures and algorithms are actually very important for you because the reality is everyone is talking a lot of crap about it everyone's like oh you don't need it in real life oh they only ask you that for the interviews oh they only use that to try to make fun of you you can actually leverage data structures and algorithms to solve real-world complicated problems i'm gonna teach you the top five data structures that you need to learn and i'm gonna teach it in the very simple and easy to understand way if you've never understood data structures and you're tired of asking professor how they even work this is the video for you now these are the top four data structures that you're going to have to learn that are going to help you further in your career and i'm going to keep it super simple so if you're struggling computer science class listen up now before we get into it i need you to understand this data structures are important because they're going to help you to land your dream job as a developer this could be if they ask you in the interview or just to really understand how to solve hard complicated problems that the job is going to require so if you are looking to become that developer you're going to want to click the link below because we've developed a full-blown course that is going to take you from xero to becoming a developer and building real life projects that will help you to land a job when you put on the resume and impress the recruiters so if you want to take your career to the next level and become a six figure developer make sure to click the link below and check out the best javascript course in the planning wait so what is data structures great question frankie so what are data structures simply put it's just different modified ways of storing data so that you can use it to your advantage let me give you the perfect example everyone knows about excel sheets and spreadsheets it's very simple to just put your whole data on a table with lots of columns and rows but let me ask you this what if i was trying to store data from google maps where i need streets how long it's going to take me to get from a place to a different place all these different kinds of things that need to take into account it's not going to be as simple as just putting it on a spreadsheet so to put it in even more simpler terms if i was to go ask you to go bring me 12 fluid ounces of water would you get a 12 fluid ounce cup or would you go grab a 12 fluid ounce bag and go get the water obviously you would use the cup because it would make more sense you could transport it a lot easier and you could bring me the water that i need in the bag maybe it's a plastic bag it's not good if it's a cloth bag the water's just gonna all fall out so by thinking about how you're gonna store the data how you're gonna pass the data that is how you could start to use things to your advantage because maybe the bag might be useful for something else for example maybe the bag could store clothes as opposed to the cup that wouldn't really be good for storing clothes so to wrap that up data structures are a way to temporarily store and format specific data so that you can use it to your advantage all right so that's cool and all but how do i know what data structure to actually use i'm glad you asked frankie so how do we know what data structure do we want to use well this is where big o notation comes in handy big o notation is a simple way to measure how long an algorithm or a data structure will take to perform a single task so when you look at the big-o notation of a specific algorithm and data structure versus the bigger notation of another one you could start to see how they would differ if you start to give it more and more data and bagel notation is very simplified because it allows you to think in terms of thousands and hundreds of thousands and millions of pieces of data and how your algorithm would interact with them so big o notation allows you to compare how long it would actually take for specific algorithms such as adding an item getting an item or doing some sort of search functionality and how long that would take if you were to start to scale the input from a thousand to ten thousand to a hundred thousand and beyond and a million and beyond and millions and millions of inputs so back to the cup and bag analogy it's as if you were to bring me back the water and i had something to measure how much water you brought back to me because i was able to measure that the 12 fluid ounces of the cup did bring 12 fluid ounces as opposed to the bag that brought zero i know that the cup would be more optimal in that case so now let's get into the data structures data structure number one arrays i am so excited to talk about arrays because nobody nobody talks about how important arrays are to every other data structure let me tell you exactly what i mean when people go through arrays and they start to understand them they start to overlook them because like oh it's just a simple thing you can access specific data from but the reality is lots of other data structures such as queues stacks lists even some types of graphs and hash tables fundamentally under the hood leverage and use arrays because all an array is is a section of memory in your computer that has different blocks where you could store data so you could think about it in terms of if you were to go into your hard drive into your memory you could pick out 10 different memory blocks where you're going to have an array and now you can add in 10 different values and change those values to the array so the reason arrays are fundamental building blocks is because under the hood if you use a scripting language like python or javascript or if you use other data structures that we'll be talking about later they are leveraging arrays which are actually static in the memory block so something to note arrays are actually static which means whenever you allocate a certain amount of memory that's the memory that's already been allocated so in lower level languages like c or java you can't really just add or append another thing to it but in higher level programming languages like javascript or python you're actually able to do those things because that's all under the hood so a huge pro for raise is that you can literally get instant access to specific objects that you're storing because the computer already knows exactly where in the memory the array data is this has fast time complexity or big o notation when it comes to storing or retrieving data now a con might be that as i mentioned before it's not dynamic in these lower level programming languages so if you need to make any changes or you need to delete a specific value inside of the array you have to accommodate a little bit more by rearranging some of the elements inside of the array so next one number two hash tables now hash tables are very similar to arrays except rather than being in a continuous block of memory they might be scattered all around this in turn gives the developer a little more flexibility to being able to just add more elements if they want to or delete elements hash tables are used under the hood when you're using dictionaries or sets a simple way to think about hash tables is realizing that there is a key value pairing so very similar to how one specific key can open one specific house in the entire block this starts to become the way you identify different objects inside of your hash table or your dictionary or your set when you're given the key you're able to then go find what house that key belongs to and you're able to pair that information together so an advantage of hash table and dictionaries is you get to easily retrieve and create data but a con to having hash tables is you're not really gonna have the ability to sort things with hash tables number three stacks and queues i'm gonna be pairing up stacks and queues because they're actually very similar data structures so first let's dig into a stack so a stack goes by the philosophy of first in last out what that means is you could think about trade tables from the cafeteria when the cafeteria person comes over and puts all those tray tables the first one on the stack is the very bottom that's the first one that got placed and after that people keep putting tray tables on top but now when it's time for someone to go eat their food the first tray table that someone gets is the one on the top which was the last one to come in so it's first in last out or last in first out they both mean the same thing just the wording is inverted now because of the functionality that you are able to use with the stack stacks might be beneficial for breadth first search which is a search type of algorithm that will be very crucial especially when you get to the next data structure which i'll talk about right now now the next data structure is cues very similar to stacks where you have something right after the other one but the difference is the first thing into the queue is the first thing that gets to go out so you could think about this like a line at the theaters the first person to show up is going to be the first person that gets to go in and find their seat some of the pros of stacks and queues is that they are very efficient and can be leveraged for other data structures for example stacks could be used for depth first search while cues could be used for breadth first search when it comes to leveraging the next algorithm which we will talk about a con for stacks and queues is they really don't have all these different test cases and use cases such as arrays or hash tables or the next data structure number four graphs and trees graphs and trees are probably one of the most complicated data structures out there and the reason is because there are so many variants you could use these things but these tend to be the ones that get used for the more complicated problems that you need to solve a graph and a tree could be thought of some simple components so they're made up of nodes and edges you could kind of think like if you were able to go back to pre-kinder and you drew your first rectangle each side that you had connecting from the vertex to vertex was your edge and the node was your actual vertex so you can actually assign values to these nodes you could see how many edges specific nodes are apart you could start to trace a lot of different things you can also go on to create data structures like binary trees that might be used for more specific use cases under the nodes you can add specific data and on the edges you can also add specific data so for an edge you could talk about the length how long the duration something that may be but basically that's the separation from one node to the other node and the node you can have essential data of where something actually stops so anyways guys to be the best software developer that you can become you want to make sure that you are continuously investing into your own education and that's why today i want to talk about our sponsor for this video skillshare so skillshare is an amazing place where you could go to and could take courses on anything you want to learn especially in software development so you could become a better programmer one of the classes that i'm taking right now and that i really enjoy is called algorithms and data structures in javascript and that class is taught by lucasv and i really love it because it goes into the fundamentals of how you can leverage these data structures and how you could use these algorithms to make sure that you're building optimal code and in this way not only will you have basic foundational problem solving skills but you're also going to be able to practice and ace any interview that you take so make sure to click the link below because the first thousand people who do so and sign up are going to get the skillshare premium membership and if you do like the platform you can continue to learn and push what you're learning and the best part is that it's less than ten dollars a month literally if you just skip out on starbucks coffee for two days out of the entire month you're gonna be able to reinvest that money into skillshare and into yourself a perfect example might be google maps so if you're trying to get from point a to point b those would be notes when you look at your google maps map you're going to notice there's a lot of turns here and there so google has literally created nodes and edges and created a whole graph system to be able to create the map that we all use when we get lost so a big advantage of graphs and trees is you can use it and leverage it to solve crazy complicated problems alright guys so these are the four data structures that if you start to master not only will you be able to pass technical interviews with ease but you're probably also going to come across problems and you're going to know how to solve those problems because you understand how to use the data structures to store the data that you need to be storing so that is it for the data structures and now the next step is going to be something that's super important which is actually implementing and executing because if you start to develop these problem solving skills as a software developer then you're actually gonna become marketable and then you can hit the six figure mark so in order to execute and implement this i would recommend that you go to lee code hacker inc or any of the other sites that you prefer we could practice these algorithms these four specific data structures that i talked about today were the ones that i used in my interviews with google microsoft and blue origin and i was actually able to get job offers from them so if you want to become that six-figure developer i would highly recommend firstly making sure you build a technical skill set and a portfolio that would attract recruiters attention and you could do that by clicking the link below heading over to profit with javascript where we teach you everything from xero to learning and building real life applications and then you could use this video and what you learned from this video to ace the interview and land your six figure developer job so if you guys enjoyed this video and enjoy this content please give it a like so that we can push this out to the world using the youtube algorithm which you know talking about algorithmic data structures it's probably quite complicated also make sure to subscribe and hit that bell notification icon so that you can get the latest and greatest the minute that we release a new video now guys that is it for this video i appreciate you sticking all the way through and i hope to see you in the next one peace so so okay so go youyo what is up guys coach daniel here and today i want to talk to you about why data structures and algorithms are actually very important for you because the reality is everyone is talking a lot of crap about it everyone's like oh you don't need it in real life oh they only ask you that for the interviews oh they only use that to try to make fun of you you can actually leverage data structures and algorithms to solve real-world complicated problems i'm gonna teach you the top five data structures that you need to learn and i'm gonna teach it in the very simple and easy to understand way if you've never understood data structures and you're tired of asking professor how they even work this is the video for you now these are the top four data structures that you're going to have to learn that are going to help you further in your career and i'm going to keep it super simple so if you're struggling computer science class listen up now before we get into it i need you to understand this data structures are important because they're going to help you to land your dream job as a developer this could be if they ask you in the interview or just to really understand how to solve hard complicated problems that the job is going to require so if you are looking to become that developer you're going to want to click the link below because we've developed a full-blown course that is going to take you from xero to becoming a developer and building real life projects that will help you to land a job when you put on the resume and impress the recruiters so if you want to take your career to the next level and become a six figure developer make sure to click the link below and check out the best javascript course in the planning wait so what is data structures great question frankie so what are data structures simply put it's just different modified ways of storing data so that you can use it to your advantage let me give you the perfect example everyone knows about excel sheets and spreadsheets it's very simple to just put your whole data on a table with lots of columns and rows but let me ask you this what if i was trying to store data from google maps where i need streets how long it's going to take me to get from a place to a different place all these different kinds of things that need to take into account it's not going to be as simple as just putting it on a spreadsheet so to put it in even more simpler terms if i was to go ask you to go bring me 12 fluid ounces of water would you get a 12 fluid ounce cup or would you go grab a 12 fluid ounce bag and go get the water obviously you would use the cup because it would make more sense you could transport it a lot easier and you could bring me the water that i need in the bag maybe it's a plastic bag it's not good if it's a cloth bag the water's just gonna all fall out so by thinking about how you're gonna store the data how you're gonna pass the data that is how you could start to use things to your advantage because maybe the bag might be useful for something else for example maybe the bag could store clothes as opposed to the cup that wouldn't really be good for storing clothes so to wrap that up data structures are a way to temporarily store and format specific data so that you can use it to your advantage all right so that's cool and all but how do i know what data structure to actually use i'm glad you asked frankie so how do we know what data structure do we want to use well this is where big o notation comes in handy big o notation is a simple way to measure how long an algorithm or a data structure will take to perform a single task so when you look at the big-o notation of a specific algorithm and data structure versus the bigger notation of another one you could start to see how they would differ if you start to give it more and more data and bagel notation is very simplified because it allows you to think in terms of thousands and hundreds of thousands and millions of pieces of data and how your algorithm would interact with them so big o notation allows you to compare how long it would actually take for specific algorithms such as adding an item getting an item or doing some sort of search functionality and how long that would take if you were to start to scale the input from a thousand to ten thousand to a hundred thousand and beyond and a million and beyond and millions and millions of inputs so back to the cup and bag analogy it's as if you were to bring me back the water and i had something to measure how much water you brought back to me because i was able to measure that the 12 fluid ounces of the cup did bring 12 fluid ounces as opposed to the bag that brought zero i know that the cup would be more optimal in that case so now let's get into the data structures data structure number one arrays i am so excited to talk about arrays because nobody nobody talks about how important arrays are to every other data structure let me tell you exactly what i mean when people go through arrays and they start to understand them they start to overlook them because like oh it's just a simple thing you can access specific data from but the reality is lots of other data structures such as queues stacks lists even some types of graphs and hash tables fundamentally under the hood leverage and use arrays because all an array is is a section of memory in your computer that has different blocks where you could store data so you could think about it in terms of if you were to go into your hard drive into your memory you could pick out 10 different memory blocks where you're going to have an array and now you can add in 10 different values and change those values to the array so the reason arrays are fundamental building blocks is because under the hood if you use a scripting language like python or javascript or if you use other data structures that we'll be talking about later they are leveraging arrays which are actually static in the memory block so something to note arrays are actually static which means whenever you allocate a certain amount of memory that's the memory that's already been allocated so in lower level languages like c or java you can't really just add or append another thing to it but in higher level programming languages like javascript or python you're actually able to do those things because that's all under the hood so a huge pro for raise is that you can literally get instant access to specific objects that you're storing because the computer already knows exactly where in the memory the array data is this has fast time complexity or big o notation when it comes to storing or retrieving data now a con might be that as i mentioned before it's not dynamic in these lower level programming languages so if you need to make any changes or you need to delete a specific value inside of the array you have to accommodate a little bit more by rearranging some of the elements inside of the array so next one number two hash tables now hash tables are very similar to arrays except rather than being in a continuous block of memory they might be scattered all around this in turn gives the developer a little more flexibility to being able to just add more elements if they want to or delete elements hash tables are used under the hood when you're using dictionaries or sets a simple way to think about hash tables is realizing that there is a key value pairing so very similar to how one specific key can open one specific house in the entire block this starts to become the way you identify different objects inside of your hash table or your dictionary or your set when you're given the key you're able to then go find what house that key belongs to and you're able to pair that information together so an advantage of hash table and dictionaries is you get to easily retrieve and create data but a con to having hash tables is you're not really gonna have the ability to sort things with hash tables number three stacks and queues i'm gonna be pairing up stacks and queues because they're actually very similar data structures so first let's dig into a stack so a stack goes by the philosophy of first in last out what that means is you could think about trade tables from the cafeteria when the cafeteria person comes over and puts all those tray tables the first one on the stack is the very bottom that's the first one that got placed and after that people keep putting tray tables on top but now when it's time for someone to go eat their food the first tray table that someone gets is the one on the top which was the last one to come in so it's first in last out or last in first out they both mean the same thing just the wording is inverted now because of the functionality that you are able to use with the stack stacks might be beneficial for breadth first search which is a search type of algorithm that will be very crucial especially when you get to the next data structure which i'll talk about right now now the next data structure is cues very similar to stacks where you have something right after the other one but the difference is the first thing into the queue is the first thing that gets to go out so you could think about this like a line at the theaters the first person to show up is going to be the first person that gets to go in and find their seat some of the pros of stacks and queues is that they are very efficient and can be leveraged for other data structures for example stacks could be used for depth first search while cues could be used for breadth first search when it comes to leveraging the next algorithm which we will talk about a con for stacks and queues is they really don't have all these different test cases and use cases such as arrays or hash tables or the next data structure number four graphs and trees graphs and trees are probably one of the most complicated data structures out there and the reason is because there are so many variants you could use these things but these tend to be the ones that get used for the more complicated problems that you need to solve a graph and a tree could be thought of some simple components so they're made up of nodes and edges you could kind of think like if you were able to go back to pre-kinder and you drew your first rectangle each side that you had connecting from the vertex to vertex was your edge and the node was your actual vertex so you can actually assign values to these nodes you could see how many edges specific nodes are apart you could start to trace a lot of different things you can also go on to create data structures like binary trees that might be used for more specific use cases under the nodes you can add specific data and on the edges you can also add specific data so for an edge you could talk about the length how long the duration something that may be but basically that's the separation from one node to the other node and the node you can have essential data of where something actually stops so anyways guys to be the best software developer that you can become you want to make sure that you are continuously investing into your own education and that's why today i want to talk about our sponsor for this video skillshare so skillshare is an amazing place where you could go to and could take courses on anything you want to learn especially in software development so you could become a better programmer one of the classes that i'm taking right now and that i really enjoy is called algorithms and data structures in javascript and that class is taught by lucasv and i really love it because it goes into the fundamentals of how you can leverage these data structures and how you could use these algorithms to make sure that you're building optimal code and in this way not only will you have basic foundational problem solving skills but you're also going to be able to practice and ace any interview that you take so make sure to click the link below because the first thousand people who do so and sign up are going to get the skillshare premium membership and if you do like the platform you can continue to learn and push what you're learning and the best part is that it's less than ten dollars a month literally if you just skip out on starbucks coffee for two days out of the entire month you're gonna be able to reinvest that money into skillshare and into yourself a perfect example might be google maps so if you're trying to get from point a to point b those would be notes when you look at your google maps map you're going to notice there's a lot of turns here and there so google has literally created nodes and edges and created a whole graph system to be able to create the map that we all use when we get lost so a big advantage of graphs and trees is you can use it and leverage it to solve crazy complicated problems alright guys so these are the four data structures that if you start to master not only will you be able to pass technical interviews with ease but you're probably also going to come across problems and you're going to know how to solve those problems because you understand how to use the data structures to store the data that you need to be storing so that is it for the data structures and now the next step is going to be something that's super important which is actually implementing and executing because if you start to develop these problem solving skills as a software developer then you're actually gonna become marketable and then you can hit the six figure mark so in order to execute and implement this i would recommend that you go to lee code hacker inc or any of the other sites that you prefer we could practice these algorithms these four specific data structures that i talked about today were the ones that i used in my interviews with google microsoft and blue origin and i was actually able to get job offers from them so if you want to become that six-figure developer i would highly recommend firstly making sure you build a technical skill set and a portfolio that would attract recruiters attention and you could do that by clicking the link below heading over to profit with javascript where we teach you everything from xero to learning and building real life applications and then you could use this video and what you learned from this video to ace the interview and land your six figure developer job so if you guys enjoyed this video and enjoy this content please give it a like so that we can push this out to the world using the youtube algorithm which you know talking about algorithmic data structures it's probably quite complicated also make sure to subscribe and hit that bell notification icon so that you can get the latest and greatest the minute that we release a new video now guys that is it for this video i appreciate you sticking all the way through and i hope to see you in the next one peace so so okay so go you\n"