• 9849-xxx-xxx
  • projectduepro@gmail.com
  • Los Angeles, USA
Business
Data Structures and Algorithms in Java

Data Structures and Algorithms in Java

Data Structures and Algorithms in Java

hi guys March here today we’re talk about the basics of data structures on algorithms which is one of topics that comes up in coding interviews all the time in fact more and more companies ask questions about data structures and algorithms to see if you can think like a programmer in this-video we’re going to talk about the basics of data structures on algorithms we’ll be talking about Big admission in college and linked lists after watching this video if you want to learn more Encourage you to enroll in my ultimate data structures and algorithms

course the link is below this video now to watch this video you don’t need any prior knowledge of data structures on algorithms but you need to know the basics of programming in this video I’llbe using Java but if you don’t know Java that’s perfectly fine you can code in your favorite programming language if you enjoyed this tutorial please support me by liking and sharing it with others also be sure to subscribe as I regularly upload near videos all right now let’sjump in and get started[Music]before we talk about data structures and algorithms

we need to talk about the Big notation we use the Big O notation to describe the performance of an algorithms lot of people find Big O scary but don’t worry I’m gonna make it super simple for you so let’s jump in and get started so what is this Big O all about well let’s start with the classic definition on Wikipedia Big O notations a mathematical notation that describes the limiting behavior of function when the argument tends towardsa particular value or infinity huh that’s the reason why a lot of people find Big O scary but as you will see inthis section the underlying concepts are actually not that hard we use Big O to describe the performance

Data Structures and Algorithms in Java

this helps us determine if a given-algorithm is salable or not which basically means is this algorithm going to scale well as the input grows really large so just because your code executes quickly on your computer doesn’t meanit’s gonna perform well when you give ita large data set so that’s why we big o notation to describe the performance of an algorithm now what-does this have to do with data-structures well as you will learn inthis course certain operations can before or less costly depending on what data structure we use for example-accessing an array element by its indexes super fast but arrays have a lengthiness and if you want to constantly addor remove items from them they have toget resized and this will get costly as the size of our input grows very largess if that’s what we need to do then wehave to use another data structure-called a linked list these data structures can grow or shrink very-quickly

but accessing a linked list element by its index is slow so that’ swhy you need to learn about the Big On otation first before we can talk about-various data structures also big companies like Google Microsoft and Amazon always ask you about Big O they want to know if you really understand how callable an algorithm is and finally knowing Big L will make you a better developer or software engineer so over the next few videos we’re going to code snippets and use the Big describe the performance of our first example this computer teacher

method takes an array of integers and prints the first item on the console it doesn’t matter how big the array is we can have-an array with 1 or 1 million items all you’re doing here is printing the first item so this methyl has a single operation and takes a constant amount of time to run we don’t care about the exact execution time in milliseconds because that