Exp. PG. #__
So GS =a Date___/_.
<<
Bilt =Sifuctore ———
By: @ Gurious— , Programmer
| Bhot fe linked lof? i = 150)
|_{t& a Wear dala Shuclire thaf CnswF of Nodeo. In
| Which clemenls are not dlored at Gntquoto memory
location . The clement wo linked uolng vei =
Head —J data [ next ->
f nope
7 | WShy we wwe Vinked list 9
@ Hoo dynamic dol& Shudave . JE Can
No Memory Nastage.
(iy
Insertion ard deleGin Eachesstna one @ needed,
ie linked SE,
A |[20| >|
| dingly linked lish. |
Osubly linked lst.
Gruulay linked list,Exp. 2G. #
nee ee Date__/_.
ra ea igh Ud TE
A_dsiqly Guked lof a Uucar dale Ohudare_w Which
the Utmenls are nol” dtored wu (mbquouc memory
location aud cach clement to (onnecked only te thy
next clement uotwg o pointe
aL *T oy] *TeT fol = null
Bafa Mexl=
Aldvess
Huidly lubed lials.
ws)
Curious. pyogyammey
a. || that to doubly Gnked Tal
A doubly linked [I= ( DDL) a opeaal type ol Caked
lst Oa IShich each nede Contam d pomtey! to the
previoun nocle op well ao the nest node qe Unked
Tots
Next Next
a Pee ere
NULL
Doubly Unked (GE
—
@ Teacher's Signature,Exp. PG. #.
Date__/__.
Bo
IShaf to Groulay linked list:
The Cheulay linked Lisl io 0 Linkecl [isl@ Where all nocleo
ave _lonneted to form o Gicle- Jn Grulay linked lish
the Hist node and the lool node are Connected [6
cach othey Ishich lows a Gicle. “There & no NULL
at the end.
HERD
— fs Slee) u
Curious —.proqrammer
EG
* Qperedtion on linked ltds.
I
i || fnsertion in linked isk:
Ht to used 16 Gusert new node alo Spedtic pat
You_con adel _o node of the paving middle , aud end.
| Insert at the beginning
1-|| Create a memony la Hep Hbde,
J: Store dald ine new node.
3. Change NexF fo the new node To pomt +o Start.
chairte btols fo tll the recenty ‘Geated node -
@ ‘Teachers Siguature____Exp. PG. #.
Date__{__
Struct node * NewNodes
NewNocle = malloc ( dizeo ( Shuctnode )) +
NewWNede=> dala=! 40,
New Nocle —> nexf= Start;
Atart = NewNode;
|| Insert of the End.
_ Curious —. proqvammer
1 || Insevf a new node and dléie dala tn ik,
a-|| Traverse the lat node da linked let.
3:| Change the neat pstuiler ps last node te the newly
=
created node.
Atrad node % Newhlode,
NewNode = malloc ( dtccof ( Shud node )) 5
NewNode —> datw = 40;
Newhlode > nexT = NULL;
Abud node x kmp= Start;
While (Femp —> ne#t] = NU
“yg
een poe —5 next;
deme = next = NewNlode
* || dasert at the Middle.
4. | Allocate Memory amd lore dala in the
Hew node,
a: | traverse the Node, Which B pur bere the new node,
©
Teacher's SignatureExp. BG, #
Date__/_.
Se Change the nexf pointer fo add a new node in between-
I
bud hode a NewNode;
H Newhlode = malloc ( dtzedf ( Shucl node));
NewNode -» Adta = 40;
Stud node -» scale = Atal;
| for linti= 25 Tx posilfon 3 "+ ) J
it (temp -» nea | = NULL)
ae temp» neat;
T tt T
Na
| NewNlocde —7 Next=-+temp— next;
temp nett = NewWlodes
!
Curious _- ex
a: | Deen In linked TOF, Sane tae ae
4 © used to delelé nodes fom a Apeulie positions .
You Can also do delehtn tn the 'Iinked! lot in three
Nays cither from the end , beginning or from }
Specie aa
* || Delete bom the beginning.
T Care)
j-| The pomt Starls at the decond node.
7
Mtart = Start > next,
@ Teacher's Signature__Exp. PG. #.
Date___.
Bue fom the End,
1. || “Traverse the Second [aot clement in the Imked lists
Change ils next Famer fe null,
Armuct node catch = Start;
| hile Comp => neat >! neat | = NULL) f
‘hemp = EU = next;
emp — oe NULLS
f UL
Pelete from the Middle. Curious _. programmer
is
Traverse the cleat before the clement to be deleted.
Change the next pointed te exclude the node fom
thed tinked Ido,
stor lint v= 23 1, positim s f++) f
ip (Amp > nekt | = NOLL)
p= temp = next;
I t |
a
temp > next = song = next> nexfs
‘Teacher's Signature__Exp. PG. #.
Tepe
Date__{__
: cea tn _Unked lish
Ho used 46 traverse all nodeo one by me. Gn this
operation, you sill oer all the wedeo in the linked
Tak.
[shen the temp null, it means you hraver-
=sed all the nodeo, and hou Sema eer To] the
Inked list es out oem the While low pl.
tract node x temp = dtart,
pint ("\n [St embpty are —")5
VW hile (ere | E Tutt)
point ("% dl" temp —y data )
s temp = terhp > next;
ae I
J
Teacher's SignatureBuy This Complete Premium Notes @ Rs. 149
COMPLETE COMPLETE COMPLETE
Uy ade
CTLs} CU ay Ce LS
% ©
Oa COMPLETE Ca
LT ES) ONT e
COLL FOOT LS HANDWRITTEN NOTES
5
COMPLETE a COMPLETE
Lie Oye Wty Ly
CTL Ua Laced ULS Lead d COU LS
CodeWithCurious Store 2
LINK IN BIOee lat a aes
Tuples & Type Conversion =
;
Chapter 5 will Be Upload
In Some Days
Find All PDFs in Our Telegram Channels
(sl
Curious Coder
100,118 subscribers
Eire alaLd
ase user smey 1