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.
Title: Data Structures and Algorithms: From Basics to Advanced
Description: 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, this guide will help you master the essential concepts and techniques of DSA, and prepare you for technical interviews, coding challenges, and real-world programming projects. From arrays to graphs, from searching to sorting, from recursion to dynamic programming, these notes cover it all in a clear and concise manner. I've also included practice problems and solutions to help you reinforce your understanding and improve your problem-solving skills. So, dive in and start your journey to becoming a proficient DSA practitioner!
Description: 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, this guide will help you master the essential concepts and techniques of DSA, and prepare you for technical interviews, coding challenges, and real-world programming projects. From arrays to graphs, from searching to sorting, from recursion to dynamic programming, these notes cover it all in a clear and concise manner. I've also included practice problems and solutions to help you reinforce your understanding and improve your problem-solving skills. So, dive in and start your journey to becoming a proficient DSA practitioner!
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Asymptotic Notations: Big O, Big Omega and Big
Theta Explained
We 'll talk a little bit about asymptotic notation
...
We talked about ordering
...
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
...
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
...
O ( n²) is Anything Can Be Algorithm it is g (n) that will
be here and which is your algorithm
...
If you ca n't find it then its is not f (n )
is O
...
This passage discusses the complexity of an algorithm, which is
measured in terms of the size of its big O graph
...
), O(n^30), and
O(n^100)
...
So you will get some
complex function Alright so this is the solution to the problem So
...
F(n) is the largest value of G(n)
that is bigger than f(n)
...
No , it doesn't depend on the size of the input
...
Consider there are different routes to come and go
...
It happened like this , I was bored in my
house
...
This guy has
amazing games like Pubg and GTA5
...
He
likes playing games a lot
...
But there is one problem , I also use jio
...
And with more internet , we ca n't sell files and all
...
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
...
There is a hard disk then there is your motorcycle
...
And you will take it and in hard disk whether you bring 250kb
or Tb
...
Runtime remained the same
...
We are to trying to remove the time
complexity of them
...
K1 n to the power 0+k2+k3+k4
This time is required in algo 2
...
Because we won't constantly use our brains
again and again, as we see Big O of 1 it is constant
...
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
...
There
are polynomial algorithms and there are exponential algorithms and there
are logarithmic algorithms and there are exponential functions and there
are logarithmic functions
...
Best Case, Worst Case and Average Case Analysis of
an Algorithm
To define an algorithm, To define the events in the life of an algorithm , We
have , Best Case Worst Case and Expected Case
...
If you watch
this video till the end , Then you will find out what this 'Log ' really is
...
5
...
7
...
If you know even a bit of maths, You 'll know that it is in an
ascending order
...
Suppose the
value of A is 8
...
Meaning 1
...
Sorry, your answer will be no , because it is n't there
...
It does n't
have much of a brain
...
Is this the best
way to do this work ? Obviously not
...
1 is lucky , He will get
A=1
...
In one comparison only
...
This means that it does n't
depend on 'n '
...
It only has to make one comparison because it is
only searching for the first element in the array
...
Till now, he was fortunate ; But now he 's not so lucky anymore
...
the sum of the run time for the total number
of possibilities
...
Average
Case is equal
...
The sum of all
...
times divided
...
number of possible run time
...
't ' ;
I 'll calculate ' O ' later
...
'n' possibilities is when there is 1st element, 2nd
element, 3rd element, 4th element, 5th element and 6th element
...
1
...
3 comparisons
...
I removed this because this is different
...
K is an integer ) SO now I 'll write it like this K n ( K is an integer ) So now I
'll write it Like this K n ( K is an integer ) So now I 'll write it like this
...
The graph of ( n^2+n ) ; graph of n ;
graph of ( N^2+n ) will go below 2n
...
?" This passage discusses Algo
2, which is a cunning person who is smart
...
Algo 2 says that he will
not make useless comparisons, and provides an example
...
Algo 2 first takes the first and last element of an array,
and then compares them
...
They match, Algo 2 is good; if they don't
match
...
How to Calculate Time Complexity of an Algorithm +
Solved Questions
Before Solving Some Questions of Time Complexity I will tell you some
tricks to get rid of time complexity
...
which will make you a very good grasp in such questions
...
In this way, whatever instructions are going on here , it is taking
almost ( k ) time
...
The third technique that I
want to tell you is this : That break the code into fragments
...
It took
constant time because it is not such that if the value of ( n ) increases, then
its time will increases
...
I
will accept it in ( k4) and ( n * k4 ) I will do it in k4 and (n* k4), and it will
happen O (n²) If you do it ( k=0 ) , ( k < n ) and if you look at it , it will come
out O ( n²) Okay, it will not (N²) ok remember you this thing
...
So once
the value of ( i ) will be zero (0) and then the value of ( j ) will run for
...
The
value of ( i ) will be zero ( 0 ) for ( n ) times running then the value of (i ) will
become ( 1 ) , it will run again (n ) times then it will go on till n
...
Then later I will ask the
question, then I am telling if it is not done
...
But
when there are 2 loops inside one , then that will run for n² times
...
If there is a
double for loop, then it becomes straight (n² ) I have handpicked some
questions which I am going to give to you guys here
...
So you see here I have opened this folder in visual
studio code
...
c as follows
...
The time of
(F1+F2+F3) will be that I will take as the overall time of the whole function
...
So now if I find a total
time complexity that is , if I T ( n ) come out , then what will it be ? T (n ) will
be done as T (N) =F1 +F2 +F3
...
'' So I gave him this blueprint
...
And even if he makes a mistake , It wo n't be a big
deal
...
Array as an Abstract Data Type
...
In that , I will give you MRF
...
minimal Required functionalities
...
Let us understand this
with the example of an array
...
Arrays are found in C, C++, Java and Java
...
There are some minimal
required functionalities in arrays
...
Along with that there can be a resize functionality
...
Accessible by an index
...
Inside the stack, there are
local variations of a function
...
Inside an array is
the heap
...
In most programming
languages, the index of an array starts at 0 It has a reason ; when we start
from 0 , We get a certain advantage but I wo n't go there
...
In that they 've
explained what will happen if it starts from 1 or 0
...
If you say that you do n't want 38 , you want a greater one
Then you wo n't get it
...
It will be doing its job with this memory
...
So you 're saying that you want to increase it So you can not
make it larger in this array
...
If you skip the practice set it 'll be over in 6 hours
...
Directly I can not resize it , I ca n't increase it
...
It can be
...
Why should we use an
array ? Why did we make an array? We made the array because Because at
one point I have these 10 addresses
...
The programming language gives them to you by default
...
This is our
abstract data type
...
And we'll add many
more operations
...
So that he/she will be able to add lots of arrays directly
...
Faster retrieval , faster updation
...
If I want to
insert an element , it becomes costly
...
There are
some disadvantages too , but it varies from use case to use case
...
And I will ensure that you get it
...
We can directly link it with object-ended
programming
...
And
here, by the name of 'Algorithms
...
Like an integer, I can also make my own data type
, Assume that I want to make a data type called 'my array' The C language
is a special type of array
...
total_size
...
Base address is the pointer
...
I 'll do it like this
...
of operations
...
What can those operations be ? Those
operations can be anything
...
So
we can define a lot of these types of operations And we can make our
custom data types
...
This is Stack And this is Heap
...
If I want to make an array, I can either I make the array in
the stack Like if this is the stack of the main function , okay
...
I 'll write Main here
...
I request some memory , And make its previous address point , And here
with my array , I can request Its indices will be 0,1,2,3,4
...
It 's my choice ;
whatever I choose to put
...
If we have to
make an array of size 'n ' , So n multiplied by ; meaning star Then the size of
operator , and after that, int
...
Figure out once you see it When I give you the notebook
...
Operations
...
e the capacity to store 6
elements
...
The advantage I 'll get
is If I ever want to make insertions in this array Then I can move them a
little , all the elements
...
And I think moving things a bit is
better
...
The capacity
of arrays is
...
So in arrays ,
the biggest advantage is this : It is the fact that you can access the element
; You can calculate from the base address
...
a
milestone 3
...
5
...
This is our
Delhi and assume there 's a route from here And from here, how many
kilometres away from here
...
So I 'll quickly tell a little bit of
implementation in this video We 're going to code anyway
...
And I do n't want to do
it on the whiteboard
...
And you should
download and install this
...
The biggest advantage of this is that today I 'm writing C language
Code in Visual Studio
...
In Visual Studio, I 've made a snippet of
boilerplate code for Array ADT
...
If you do n't know where to get this code or If you
don't know how to use it, Then you can refer to this video
...
For
example, if Google is taking up too Chrome much RAM You 'd wish for it to
take up less RAM
...
A custom My Array abstract ADT uses a pointer that points toward the total
size, the used size and the first element
...
My array can not go beyond this Because the
compiler has reserved the remaining memory for someone else
...
This is how I felt it should be
implemented
...
There can be another
implementation as well
...
And once I get the structure instance , Then I can add a dot and
access its total size or anything
...
= t size I 'll want that this t-size is
passed And along with that , I 'd want that used size should also be passed
...
We 've
even set that we have to use 20 blocks only
...
But for
now, we must use only 20 blocks
...
We put a star when we want the value of the address and call the
ampersand the address of the operator
...
And if you want to use 20 and
want to make it 100
...
e this is where you 've given the structure address , It will
dereference that with a star
...
It replied , okay
...
So for that I 'll have to call for the createArray function
...
And it will update its pointer in this itself
...
It 's in my Python course but it 's very useful
...
And here I will write scanf % d & n & n
...
Operations on Arrays in Data Structures: Traversal,
Insertion, Deletion and Searching
Today we 'll talk about some operations in array
...
It 's the easiest thing in array, it 's like 2x2=4
...
If you want to print all the array
elements or you may want to set this array
...
or similar doubts, then your situation is such that you need to write C
language
...
At about 11 at night, you 'll be done with it
...
I've included practice in it
...
I'll tell you what I was going to say
...
So, you can make two variables, one will be
capacity
...
You can make size , it will be 5
...
Capacity shows that this is the
potential
...
That's why you take a higher
capacity in array and the size is 5
...
The children are
standing here and suppose something is being given out like ice cream
...
Though in school you
join the line first and shift later
...
This
goes up to 99, 0, 1, 2, 3, 4
...
Now, if you 're a very lucky person , then you 'll get index
number 5 for insertion
...
I
have provided everything , just download the notes
...
I zip it so that all codes, source
codes, and pdfs are in one place
...
It 'll be O ( 1) in best case,
you had to delete the last one
...
In both best case and worst case cases, the size does n' matter
...
There 's no other option , only prayers
will work
...
You do n't want an overflow
condition , it 's called overflow
...
You
can search in this way, one by one
...
This is called linear search
...
You 'll take its
greatest integer and mid will be 2
...
You'll
check if it 's greater or smaller than mid , it ''s smaller
...
After this
convergence, your search will be over
...
Otherwise, binary search is the way to go
...
In the
coming videos, we 'll code these operations in C language and C++ too
...
Python, Java etc
...
Majority of the people wanted data structure
algorithm in those languages
...
We 'll
understand whatever we did in theory and I hope you like this course
...
If you remember , we
had talked in great detail About what ? We 'd talked about some array
operations in detail
...
This is a course for data structures
I do n't want to teach you how to print the elements of an array
...
And that it
has the capacity to store 100 elements
...
If there is no space in your array, then what can you do? If
your whole array is full; when your size is > or = to the capacity , Then I ca
n't take any more in it
...
When there 's no space or capacity you 'll have to return -1
...
And ahead of this , there is a lot of
space
...
So I 'm taking -1 as a
representation because if you return
...
Okay ? Now I 'll do this
...
n't
...
Now if it
does n't get returned , what does it mean ? So I want that index 4 should
go ahead
...
If there was n't space then it
would return it
...
I 'm starting from i=size -1
...
'll have to do arr (i+1 ) =arr (i )
...
1 for success
...
I hope that this course must be
helpful for you
...
And many of you have downloaded the notes
...
If the insertion is successful, You will
print the new , modified array
...
Title: Data Structures and Algorithms: From Basics to Advanced
Description: 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, this guide will help you master the essential concepts and techniques of DSA, and prepare you for technical interviews, coding challenges, and real-world programming projects. From arrays to graphs, from searching to sorting, from recursion to dynamic programming, these notes cover it all in a clear and concise manner. I've also included practice problems and solutions to help you reinforce your understanding and improve your problem-solving skills. So, dive in and start your journey to becoming a proficient DSA practitioner!
Description: 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, this guide will help you master the essential concepts and techniques of DSA, and prepare you for technical interviews, coding challenges, and real-world programming projects. From arrays to graphs, from searching to sorting, from recursion to dynamic programming, these notes cover it all in a clear and concise manner. I've also included practice problems and solutions to help you reinforce your understanding and improve your problem-solving skills. So, dive in and start your journey to becoming a proficient DSA practitioner!