Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Data Structures and Algorithms.

Rating
-
Sold
-
Pages
2
Uploaded on
05-04-2023
Written in
2022/2023

This notes will explain about data structures and algorithms for beginners with basics.

Institution
Course

Content preview

DATA STRUCTURES AND ALGORITHMS

We use the Big O notation to describe the performance of an algorithm. This helps us determine if a
given algorithm is scalable or not which basically means is this algorithm going to scale well as the input
grows really large. Just because your code executes quickly on your computer does n't mean it 's gon na
perform well when you give it a large data set. Using the Big O notation to describe the performance of
our algorithms we 're going to look at code snippets and use it to describe performance of algorithms.
Over the next few videos we ''re going to talk about how scalable an algorithm is and finally knowing Big
L will make you a better developer or software engineer. The algorithm is the algorithm that we use for
printing all combinations of items in an array. here we 're using a traditional for loop we could also use a
for each loop for example for int number in numbers we could simply print the number we're still
iterating over all the items in this array. The run time complexity of this method is o of 1 plus n plus 1
which we can simplify to or of 2 plus n however when using the Big O notation we drop this constant
because they do n't really matter.

An algorithm that runs in quadratic time is more efficient and more scalable than a linear algorithm. As
our input grows larger and larger algorithms that run in O of N squared get slower and slower.
Algorithms that run into a linear search are more efficient than those that run through linear time.
Algorithm that runs through an array of sorted numbers from 1 to 10 can be more efficient. An
algorithm with logarithmic time is more scalable than one with linear time. An algorithm that runs in
exponential time is not scalable at all it will become very slow very soon again I can not show you an
example of this in code now because it's a bit too complex to show it in code. The run time of this
algorithm increases linearly and in direct proportion with the size of our array. Marcia explains how we
can use the Big O notation to describe the runtime complexity of our algorithms in an ideal world we
want our algorithms to be super fast and scalable and take minimum amount of memory but
unfortunately that hardly if ever happens it 's like asking for a Ferrari for ten dollars it just does n't
happen most of the time we have to do a trade-off between saving time and saving space. Marcia says
this video is actually part of my ultimate data structures and algorithms course the complete course is
13 hours long.

I highly encourage you to take this course and learn all the essential data structures and algorithms from
scratch. divided it into three parts so you can take and complete each part easily. The course is packed
with almost 100 interview questions that get asked by companies like Google Microsoft and Amazon. Ar
arrays are static which means when we allocate them we should specify their size and this size can not
change later on. To add another item we'll have to resize the array which means we should allocate a
larger array and then copy all the items in the old array into the new array this operation can be costly
can you guess the runtime complexity of this operation? IntelliJ imports an array of 3 items in Java dot
util so we press ENTER and use the dot operator and call the two string method a password array. This
method will convert it to a string and then we 'll print that string on the console no let 's run the
program one more time there you go much much better.

As we learn arrays in Java or static which means they have a fixed size and this size can not be changed
but now we 're going to do something really cool I 've created this array class which is like a dynamic

Written for

Institution
Course

Document information

Uploaded on
April 5, 2023
Number of pages
2
Written in
2022/2023
Type
Class notes
Professor(s)
Vijay joseph
Contains
Computer science

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
sameerrithwik13

Get to know the seller

Seller avatar
sameerrithwik13
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions