Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Samenvatting

Summary dsa or data analytics

Beoordeling
-
Verkocht
-
Pagina's
70
Geüpload op
17-03-2023
Geschreven in
2022/2023

Here i have updated all the notes for the detailed study of the data analytics or ds so please find the attached docx and prepare for your exams

Instelling
Vak

Voorbeeld van de inhoud

Introduction to Linked List | Need of Linked
List | DSA Tutorials
Memory is very crucial data source in our system we do not have unlimited memory in a
computer system fine so it is a responsibility of a memory manager to manage this resource.
Memory manager will allocate how many bytes 3 into 4 that is 2 any bytes fine so let us
suppose one complete block of 12 bytes has been allocated suppose from 102 from
hundred to this one this is free. 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
cannot extend the size of your area because I have already allocated that that consecutive
block to some other variable. Memory is not free the memory manager cannot allocate this
free memory to another variable but this programme is not using that memory so this is
what the wastage of memory is there. Linked lists is also a collection of elements and arrays
were also a collections of elements. The only difference is this data items are not storing
consecutive locations because this in area these are stored in consecutive location
continuous location. 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 bytes would be.
The memory manager will allocate space for all the five variables some fresh block would be
allocated no why so because these values are not in contiguous locations so if anywhere
space is available for 8 bytes then memory manager can allocate space they are only fine
and we can provide space. Link to link into this node for that new node inserted but in array
we cannot do this because in array drobik is what all the value should be in consecutive
locations. In case of linked list cygnus here this particular node is containing two values and
type of two values so is different one is integer value and this one is what address. man two
members are there one is this 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 address of some another
integer variable. If you know this this this address 1 0 2 if you know the value of this head
this pointer they can then you can easily reverse this linked list fine.
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. take order of n time complexity and in array it is order of 1 only next
point you can say binary search is not possible in linked list. In next chapter I am going to
discuss the basic operations of this linked list traversal insertion deletion something like this
with the help of their code.

,Linked List Implementation in C/C++ |
Creation and Display | DSA Tutorials
chapter is for this topic is you should know the basics of link list what is link list
how to represent a link list or a singly linked list. You should know what is
dynamic memory allocation and how to use the Mellow function in c language.
Plus, you should have the knowledge of pointers plus structure what is structure
data type in c. language. In C language we are going to write strict 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 not 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. The syntax is what you simply write
mellow and in break it you will write what the size how much memory you want
right. In C++ you can use new keyword fine to use malloc function in C++. Malloc
is going to return a pointer to the starting address of that memory block.
The data type is int so we are going to use percentage D and now C you cannot
directly write here hash in this address of and data. to store that address into this
new node pointer that is pointer to node but it is going to return what void
pointer to show you how to typecast this one. Head is equal to new node so
simply you can write head is. equal to. new node. Head is going having 100 the
address of the first node. going to contain zero now next thing is you have to
point this to this right so now you have. to store this address into this head. You
simply write head is equal to new node then in this case also now head is going to
contain head is equals to new node. So simply how you can access this part this
structure because this node is having datatype structure so you cannot simply
except this one using arrow Prater.
We are going to store new node the new node is going to contain 300 so here we
can insert now. According to this coding we have lost the link to this node now
this node is not in the so now this you cannot write so the solution of this
problem is what you have to take one extra. 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. not move this head we can we can
move this temp now right now here we can write temp of next because this node
is having two pointers this one this one. 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 next chapter we 'll discuss how to insert newly created node in the list at
beginning also at any position also and at end of the list fine so I 'll see in the next

,chapter how you can create node and traverse the list I hope you got the concept
in next chapter. till / take




Reverse a Linked List - Iterative Method |
Data Structure Tutorials
In this chapter we'll use what iterative approach to reverse a linked list using
loops and recursion. In the first chapter 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. After reversing of this linked list the output should be something like 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 cannot
move here because this link is broken. C in this case also we are going to create
three functions one is create linked list second one is reverse and third one is
display the linked list. We have already discussed the coding of those functions in
the previous chapters you can check out that we do in this I button chapter.
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 is going to store address of previous node so
obviously we have to update the previous node value so now this previous node
should contain hundred. 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. Alexis says he has reversed all the links but one thing you
have to take care header still pointing here. 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.
The code will work even if you have only 1 node if only one node is there that is 5
is there then output is also 5. 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.


Introduction to Doubly Linked List in Data
structures | DSA Tutorials

, A doubly linked list is having only a single link. This link single link to its next node.
Each node is having three parts one is data part. This is address part and this part
is what address part. Address part is going to a store address of next node. Right
100 200 400 is I'm taking addresses in memory random addresses. C is a doubly
linked list two links are there double links. The data type of this node is what
struct node. This complete is what data die we have defined our own data type.
This is user defined anytime that is a struct node. Two parts are there that is. This
is having integer data type and says a pointer to the next node. The concept of
doubly linked list came into picture as a result of the concept. The idea is that you
can. traverse the linked list in forward direction as well as in backward direction
because two links are there, but in this case we can go only forward. IN. This case,
deletion is easy. If you want to delete a node, then only one pointer is enough,
but here we have to maintain what two pointers for deletion and insertion is also
easy.
IN next lecture we will discuss how to implement a doubly linked list have to
perform insertion operation deletion operation and how to traverse how to
display the data. data, then this data and the statement this data because you we
can traverse this list in backward Direction also because of this link.

Geschreven voor

Vak

Documentinformatie

Geüpload op
17 maart 2023
Aantal pagina's
70
Geschreven in
2022/2023
Type
SAMENVATTING

Onderwerpen

$3.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
harshchauhan0807

Maak kennis met de verkoper

Seller avatar
harshchauhan0807 competition
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
3 jaar
Aantal volgers
0
Documenten
5
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen