Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views2 pages

DSA Assignment

The document discusses linked lists, explaining their structure and advantages over arrays, particularly in dynamic memory allocation for operations like insertion and deletion. It includes algorithms for deleting a student from a linked list and inserting a node at the end of a linked list. The document emphasizes the importance of memory management in linked lists.

Uploaded by

venkatramana8281
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

DSA Assignment

The document discusses linked lists, explaining their structure and advantages over arrays, particularly in dynamic memory allocation for operations like insertion and deletion. It includes algorithms for deleting a student from a linked list and inserting a node at the end of a linked list. The document emphasizes the importance of memory management in linked lists.

Uploaded by

venkatramana8281
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Aesigest-1

inked ist2 tow linked istlist ane bcten than


h Wht. is
ist ts the üneas colletion ot data, ne elernerts calledodei
inked Orde is means of poilers.
Unean given b
whene
is divided into teo pacte , whene the ist pant contan
fach node and seond nt contans the addeys to nextnode
the infomation Ald.
ot ust calle d unked
lfoked Ust are betten thana a because y
wOYtstotie memoY alloction, whee as lnke d Bst
on
alloak
iiü dynaè memoyperfomming opeations ike inietion ar deletion
while the adele
ay change
we have to
ses
:% Linke d ist ted.
perto, emnig
mem
eleets
a Kegre d but n array space
may be was
maintoineda lst ot good shperts in theto
. A teah e has she has adtea tÁe et stydent. to ay
isted aidentally to delete that stu ent.
Wnte ann algo thm
Weakenone. Wte
Deleta-student e beg l
Alogaith
pint"un der-tow
else
lol Curent stort
l"a Stostt Sttnext
-NuLL
Csent -> next Cee (nert)]
1"3
Release the memo the hstnode In t
is not empty jmake
the Unked ust
#
ist as unent node tn seguene
t the nert make d Ceorent
’ Make stat Point for the node
Reease the mernory

Geetha Manaswin
ekaycsUNOO4}
3) Wite an algoithm to in sett at the end ot the inke st
Stot z Nul
tlgertthm Insentt At Ehdc) #
i. Cveate node [ihei* (tet node *) maloc (sine of csbnuet node)]7
a. fnte data Cnewr - into dato]
3-It (stat =NULL)
3-I Last newi
3-& Stat newi
else
Bl Layt nextnew
3-a ast new
Ly. Lost -nertNUL

’ Allocate menmoyfr the node. to be evéotd aid neme Tt newl


Gie the dato nfoynation to the no de nen1
’ I t s not an ink ist then make the ast vaable
potnt. to neg..
’ Make theast Vasiable as newI
’ Ayain point the last Vaoiable to .

feetha Manasuni
aku(sUNOOH

You might also like