Data Structure & Algorithms
Sunbeam Infotech
Sunbeam Infotech www.sunbeaminfo.com
Linked List List
-
Singly
head
① display :
OCOD
② add Last : 0cm) to → 20 → 30 →
403
③ add First : OCD
⑨ add At Pos : 0 (pos)
avg.io
⑤ del First : OCD
⑥ del Last : OCD
⑦ del Athos : )
Ofpos
avg : Ocr)
⑧ detail :O
←
Sunbeam Infotech www.sunbeaminfo.com
Linked List List
-
Singly
head tail
① display :
OG3
%→za→3•
µ
② addlast : OCD →
403
www.mmn
③ add First : OCD
tail nm
head
⑨ add Athos : OCPOD a>
a
&
avg 0 I @ → z@ → → → 40
-9503
⑤ del First : OCD tail next am
. -_
;
del OG3V tail
⑥ Last :
-_ mm
;
Y%
del Athos OCPOSJ head tail
⑦ :
⑧
airs : %)
%→2a→3o→aoz
detail ←
f¥g
.
:O
③
Sunbeam Infotech www.sunbeaminfo.com
Linked List -
Singly Circular list .
head
100
+ rare heed ;
' ' 200 22 300 33 I @
'§←a3oa✓→
do {
pf( tour . data) ;
trav-toav.me xti
while ( trev !
- ↳
3
-
22 33
11
¥ if list is empty ,
return :
Sunbeam Infotech www.sunbeaminfo.com
Linked List -
add Last C)
head
frau
t t
To →$④ 4
←
•
so
.
to → see → →
am
F%
special : ③
① create non & init tisn
I 0
last node CH Io?.de
W→
till
② traverse
should be
had
③ msn.net
III
=
④ toav .
next = 'M
mn . next = head
;
Sunbeam Infotech www.sunbeaminfo.com
Linked List -
add First c)
① create nn & init
① nn head ②
⑤
f f
.③-
t
20 30 →
t
40
② train till last node
¥✓
to → →
go ③ nn near = had
④ last nude nest -7
③ head =
may
Sunbeam Infotech www.sunbeaminfo.com
Linked List → add At Pos .
①
damn
µ #Tf③
head
④
! a a → to
£N\pos÷|
1 → so → 30 *
i =3 pos = 8
§→aa→oyHoIµ
head
Sunbeam Infotech www.sunbeaminfo.com
del First C)
Linked List →
empty
⑨ if list is
head
ftp.w
,
exception
&§O
throw
¢
.
10 → → 30 → 40
n§jfW §d]÷n:±Eu
see
5l
① tour till last node .
87:*:[ 5%9
Sunbeam Infotech www.sunbeaminfo.com
Linked List → del At Pos C)
"
Id→
÷W
so
• →
Sunbeam Infotech www.sunbeaminfo.com
Linked List
feed 3②
1£ to
③
→
→ to → so
list into singly tin list
①
.
convert air
head next
-
=
null ;
② make had null
head ± null ;
Sunbeam Infotech www.sunbeaminfo.com
Linked List -
Doubly Linear List
head
head
④
L
65%7207303
10 2007 300-20030 Q
\gi
a 20
[ so . yg
of next node
next → adds
node
poor
→
adds of poor
.
Sunbeam Infotech www.sunbeaminfo.com
Linked List - display C)
head head
!
1 ✓ r
r ✓ ✓ it
T > 20730740 ]
{0520730--40} g.
tour head ; till last node
=
① traverse
null )
.
while Ctrav ! =
tour heads
=nW)
{ data
)j while Ctoav next !
pf ( tou
.
next ;
next tour
train din
.
tour tour
ten
in
.
z each node
② train & point
null )
Ctrov f-
forward display while
- 9 point ( ther data).
trait trav .
poev ;
ooorqdispby_
Sunbeam Infotech www.sunbeaminfo.com
Linked List -
add last c) ladd First C)
not
trov
head
IF2A Isa > 4%3--56
.
④ head
I> • ← 30=403
⇐Eii3
node is first node .
In
Sunbeam Infotech www.sunbeaminfo.com
Linked List
sin vd=5O nn
pos=4 d ③
head ⑤
50¥
I !=aaFga=f ]
[ ①tr*v
②
temp
add after last pos
special
.
case ; hnvd=sz tin
g-
t
pos =
mff.SI ]
head
& - zo
- go → Leo
Eve
]
- - ←
p 4
[ tear
temp
Sunbeam Infotech www.sunbeaminfo.com
Linked List -
del first C)
[IIEa > so I 403
1¥
¥4.gs Too
Sunbeam Infotech www.sunbeaminfo.com
Linked List - del last
head
trav
It The
[
→ we
-→µe-→4a ]
traverse till P0S
①
.
to tour 's neat ,
node's next
② previous
to tear 's poor
rude
③ next node 's poor
-
head tmv
← ! ②⇐¥÷ 9
pipe
~
Sunbeam Infotech www.sunbeaminfo.com
Thank you!
Nilesh Ghule <
[email protected]>
Sunbeam Infotech www.sunbeaminfo.com