This course is primarily for placement preparation and will be using C and C++
for the algorithms and data structures. The notes for the course will be provided
in PDF format for convenience. Data structures are essential for developing
efficient algorithms that arrange data in main memory for optimal usage. It's
important to note that algorithms and data structures are two different things. C
is a bare-bones programming language that requires you to do everything
yourself, but Java can also be used to implement algorithms. This course is ideal
for those looking to switch jobs or prepare for interviews, and there is a 15-hour
video on C programming available on the channel with notes.
Data structure is the arrangement of data in main memory, and the concept of
database, data warehouse, and big data will be covered in the course. The fuel
of big algorithms is data, and keeping it properly in the hard disk is essential for
efficient retrieval, updating, and deletion. Although data warehousing is beyond
the scope of this course, it's still important to understand it. Data structures and
algorithms are best learned from C and C++, which provide a good picture of
memory usage. The concepts of stack and heap are essential in understanding
how C programs work, and space and time complexity will be covered in future
videos. Overall, this course will cover many data structure concepts, such as
linked lists, arrays, binary search trees, and more.
know these three terms because big data is what we are talking about
here .memory location where the C program stores the data that is to be
processed next and the heap is a memory location where the C program stores
the data that is to be processed next but the data that is to be processed next is
not always stored in the same location as the data that is to be processed next
because the C program can keep data in different memory locations depending
on the situation and this is why it is important for you to understand the stack
and heap because you will be able to understand the C program better and be
able to ask more questions on the C program. Alright ... I 'm talking about C
program that 's why I say that you get a good picture of memory with the help
of C programming therefore , data structures and algorithms is best learned
from C and C++ Now here I am dividing it into segments so there is thing
called code segment let 's say this is my code let 's say there is a code with the
name `` harry.c '' now this code will be first loaded into my main memory I told
you what is the first thing that happens ?then it will come to this line it will
come to fun1 ( ) , it will execute fun1 ( ) . fun2 ( ) is calling inside fun1 ( ) now
the variables that I had created inside it will be created here let 's say I have
created `` k '' & `` l '' let me write here : initialize k and l and after that I 'm
calling fun2 ( ) so as soon as fun2 ( ) will be called it will say to fun1 ( ) that
, you wait for a while , I call fun2 ( ) and be back by fetching the value whatever
it will return fun1 ( ) replied that you go and get it call fun2 ( ) and get its value .
Time Complexity and Big O Notation
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.
We are not studying algorithms, we are listening to a story. We are doing a real-
world analysis of things. Big O is called a constant runtime algorithm. Because
it was constant we remove n to power 0 and make it 1. So this is Big O of n to
the power 0. 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. My main time is required
in that ok. 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. If there is an SSD in your computer then it
will open in 4 secs If you are using a supercomputer then it can even open in 1
sec. L1+ consider your speed is L2. Ok, so it takes a constant speed of your This
is not equal to. Writing equal to is wrong here. So here I will say that The most
difference that will be visible It will be because of this term. Because n to power
1 , if I increase input and make it 10 lakh. So this was of 2 lines but this will
become 10 lakhs. So the higher degree term in the polynomial In any equation
The most impactful term It is taken ok. So I picked this because in comparison
with n to the power 0 it is big. And I want to see things in a simple way.
Big O of n square. Big O is a log that scales according to the time required to
run your algorithm. Linearly if your time scales with the input size. If it runs in