Data Structures and Algorithms: From Basics to Advanced
1 view 0 purchase
Course
CSE (PCCCS602)
Institution
MAKAUT University
Welcome to my comprehensive notes on Data Structures and Algorithms! In this guide, I've compiled a wealth of information on the most important and widely used data structures and algorithms, along with practical tips and real-world examples. Whether you're a beginner or an experienced developer, t...
array linked list stack queue tree graph hash table heap binary search sorting algorithms eg
quick sort searching algorithms eg
binary search dynamic programming recursion trie b
Written for
MAKAUT University
CSE (PCCCS602)
All documents for this subject (1)
Seller
Follow
debanajndas
Content preview
Asymptotic Notations: Big O, Big Omega
and Big Theta Explained
We 'll talk a little bit about asymptotic notation. we talked
about order. We talked about ordering. We have primarily 3
types of asymptic notation big O, big Theta (Θ ) and big Omega
(Ω) big O is represented by capital (O), which is in our English.
Big O is set to be O ( g ( n ) ) if and only if there exist a constant
( c ) and a constant n -node such that 0 ≤ f ( n) ≤ cg (n) is O (g
(N) If you watch this video completely then I guarantee that you
will understand these three notations. Mathematically,
mathematically this function can be anything. When we do
analysis of algorithms comparing any 2 algorithms then f ( n )
will be time and what is n , it 's input ok , size of input. G ( n) is
your function which will come inside the big O. O ( n²) is
Anything Can Be Algorithm it is g (n) that will be here and
which is your algorithm. If you guys can find any such constant
( C ) and ( n ) -node , then f ( n) is O ( g ( n)" This is the
mathematical definition of big O. If you ca n't find it then its is
not f (n ) is O. This question is its own truth , it has validity , it
will remain valid.
This passage discusses the complexity of an algorithm, which is
measured in terms of the size of its big O graph. THe author
states that the complexity of an algorithm is automatically
O(n^5.), O(n^30), and O(n^100).& G ( n ) is intersecting with f
( n ). So you will get some complex function Alright so this is
the solution to the problem So. What we have done is WE have
taken a big function and we have made it so that it is always
below the original function and that's what [UNK] means THe
definition of [UNK] for a function. F(n) is the largest value of
G(n) that is bigger than f(n)..
, Time Complexity and Big O Notation
So the input size didn't increase and the runtime of the algorithms
didn't increase either .No , it doesn't depend on the size of the
input . 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. Consider there are
different routes to come and go.
I want to tell you guys one story. It happened like this , I was
bored in my house. I was so bored that I needed some
entertainment. This guy has amazing games like Pubg and GTA5.
So he has a collection of games. He likes playing games a lot. And
you can get every type of game from him. But there is one
problem , I also use jio. He also uses jio and we get just 1 Gb for
one day. And with more internet , we ca n't sell files and all. So for
me , what is the fastest way to take the game from this friend. So
what will I do ? I will take my bike As the size of this input will get
increased, the runtime of the algorithms will increase. This means
that as the input size is increasing like that The time required to
send the file , That is also increasing. There is a hard disk then
there is your motorcycle. You will go on that bike. And you will
take it and in hard disk whether you bring 250kb or Tb. As the
input size of algo2 increased like that what happened ? For that ,
there was no change in the runtime. Runtime remained the same.
So we say as the size of the input keeps on increasing , Similarly,
what is the effect of the algorithm on runtime. We are to trying to
remove the time complexity of them.
is the algorithm that runs in constant time . K1 n to the power
0+k2+k3+k4 This time is required in algo 2 .The sentence is: Run
time of it, there are some things that we will recite. Because we
won't constantly use our brains again and again, as we see Big O
of 1 it is constant. Now, come here and listen to another story. If
we do an analysis of the first algorithm, If I do T algo1 Then what
will happen here? And along with consider that game is of L3 kb.
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 polynomial algorithms and there are exponential
algorithms and there are logarithmic algorithms and there are
exponential functions and there are logarithmic functions. There
are also algorithms that are not linear in time.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller debanajndas. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.89. You're not tied to anything after your purchase.