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: ABOUT LINKED LIST
Description: A linked list is a linear data structure it is a collection of data elements which are stored in known consecutive locations. Accessing of any elements will take order of 1 only constant time fine here insertion is easy and deletion is also easy why so because see if sorted air is there like this see.
Description: A linked list is a linear data structure it is a collection of data elements which are stored in known consecutive locations. Accessing of any elements will take order of 1 only constant time fine here insertion is easy and deletion is also easy why so because see if sorted air is there like this see.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
DSA-LIKNED LIST
Introduction to linked List
Memory is very crucial data source in our system we do n't have unlimited memory
in a computer system fine so it is a responsibility of a memory manager to manage
this resource
...
In advance the
programmer told that I want size for only three integers so he has allocated 12
bytes now what a memory manager will say he 'll say I can not extend the size of
your area because I have already allocated that that consecutive block to some
other variable
...
Linked lists is also a collection of elements
and arrays were also a collections of elements
...
some cases then fresh a block of 452 452
elements how many bytes 52 into 4 so 2 0 8 bytes would be allocated a new block
of to 0 8 byte would be
...
Link to link into this
node for that new node inserted but in array we can not do this because in array
drobik is what all the value should be in consecutive locations
...
man two members are
there one is this one one one and this one now why I am writing here struct node
as you know if you want to declare a pointer which is going to store a ddress of
some another integer variable
...
A linked list is a linear data structure it is a collection of data elements which are
stored in known consecutive locations
...
take order of n tim e complexity and
in array it is order of 1 only next point you can say binary search is not possible in
linked list
...
Linked List Implementation in C/C++ | Creation and Display | DSA Tutorials
Topic is for you to know the basics of link list what is link list how to represent a
link list or a singly linked list
...
Plus you should have the
knowledge of pointers plus structure what is structure data type in c
...
In C
language we are going to write struct node if you do n't write def fine in C++ you
can simply write this node that is fine but here I am discussing C language fine now
we have created this head node initially suppose we n't have any node in the list so
initially what head pointer will store head is going to contain word 0 or you can say
null
...
In C++ you can use new keyword fine
to use malloc function in C++
...
The data type is int so we are going to use percentage D and now C you can not
directly write here hash in this address of and data
...
Head is equal to new node so simply you can
write head is
...
new node
...
going to contain zero now next thing is you have to point this to this righ t so
now you have
...
You simply write head is equal
to new new node then in this case also now head is going to contain head is equals
to new node
...
We are going to store new node the new node is going to contain 300 so here we
can insert now
...
temp temp is equal to new node that is 200 fine
when we were creating when we 're inserting this second node fine press plus what
you will write here temp is
...
If user press 0 it means where you are not going to create
another node now we are going to print these values fine so for that what you will
write after this what you'll write you will ask from the user do you want to continue
for taking input you are using scanf address sorry percentage D address off
...
In the first video we discuss the method we will apply the method
here and after that we will write down the code see how you can reverse this
...
Each node is
going to contain address of its previous node so we have to maintain the address
of previous node also fine in this case right now previous node is having zero right
so now this link has been broken now fine so now we can not move here because
this link is broken
...
Both current node and next node will contain whatever the value in head in head
we have 100 so here hundred and here also hundred so now this is also pointing
here and this is pointing to the first node now we are going to start the traversing
till where till here what condition you will write obviously this means that this next
would be zero
...
Next node using this next role pointed you can access this node
so next node next is 150 right so here you can write what current node is equal to
next node
...
Head should contain address of this node that is so
from where you can get 300 no problem we have previous node link and this is
containing 300 that is why we are maintaining this previous node so now after this
while loop you can write what head is equal to previous node
...
value is 300 so now head is pointing here fine so as
you can call the display function fine and the output would be 7 1 6 and 5
Title: ABOUT LINKED LIST
Description: A linked list is a linear data structure it is a collection of data elements which are stored in known consecutive locations. Accessing of any elements will take order of 1 only constant time fine here insertion is easy and deletion is also easy why so because see if sorted air is there like this see.
Description: A linked list is a linear data structure it is a collection of data elements which are stored in known consecutive locations. Accessing of any elements will take order of 1 only constant time fine here insertion is easy and deletion is also easy why so because see if sorted air is there like this see.