Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: Notes for DSA
Description: Notes for DSA

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


Time Complexity and Big O Notation (notes) CodeWithKAZAMA

Time Complexity and Big O Notation (with notes)
CodeWithkazama
So the input size didn't increase and the runtime of the algorithms didn't increase either
...
When we ask questions like as the input will increase,
Then the runtime will change as per what? And after that Now you will go to aunty's house You
will be treated
...

I want to tell you guys one story
...
I was so bored
that I needed some entertainment
...
So he
has a collection of games
...
And you can get every type of game
from him
...
He also uses jio and we get just 1 Gb for one
day
...
So for me , what is the fastest way to
take the game from this friend
...
This means that as the input size is
increasing like that The time required to send the file , That is also increasing
...
You will go on that bike
...
As the input size of algo2 increased like that what happened ?
For that , there was no change in the runtime
...
So we say as the
size of the input keeps on increasing , Similarly, what is the effect of the algorithm on runtime
...

is the algorithm that runs in constant time
...
The sentence is: Run time of it, there are some things that we will recite
...
Now, come
here and listen to another story
...
If the game is of N kb
then how much time will you need? The sentence is: Run time of it, there are some things that
we will recite
...
There are also algorithms that are not linear in time
...
We are doing a real-world analysis
of things
...
Because it was constant we remove n to
power 0 and make it 1
...
If I do T algo1 then what will happen
here ? What do I have to do ? When I am sending data then I must upload and send
...
Now, considering I turn on my computer In that , I will need time L1
After that what happened ? Consider all preparation I required L1 which will be a constant 5
secs,2 secs , 10 secs
...
L1+ consider your speed is L2
...
Writing equal to is wrong here
...
Because n to
power 1 , if I increase input and make it 10 lakh
...
So the higher degree term in the polynomial In any equation The most impactful term It is
taken ok
...
And I want to
see things in a simple way
...
Big O is a log that scales according to the time required to run your
algorithm
...
If it runs in linear time Big O
...
O in the industry means the order of And its
mathematical definition that I will tell you
...
But when you
are answering in industry Then industry definition is used
...

Then I will say an order of because big O has a different definition
...
The graph of Big O of 1 is plotted like this
...
Do
n't confuse it with the x=1 graph
...
Constant , whatever constant was
there in constant time it was running
...

Time complexity is the study of the efficiency of algorithms
...
Time will increase and time will increase or decrease
...
They
were very simple
...
And over there Rohan's algorithm was
around 120-130ms
...
After that when I gave 1000 elements for their algorithms ,
Then shubham's algorithm got busted over there
...
Both
are better in their places
...
take the highest order term
...
And Big O n square square is here
...



Title: Notes for DSA
Description: Notes for DSA