You are on page 1of 12

Data stvuctures 21600 3 0883

MNDPavean
Home assignment-2 Robl No: 15
Trace the piven Tahn enp roth Ack hck whih
:is hsanced Ca) rok
+-C-)+ %)* (a)
SNO statk Descinkier
Synbo Cnp

roshed
inko shack

Posked

3 a
i t e 'a' in

(+
Pessfn nbian
Push
S
b CC+
cte b i
netein
a PoP tfudik in
Push
nhbe
7 sacle
C-C
Pos
C(-C abC il C
(-C alt c
Posh
C(-C abtcd wYibe i
Posefi
altca RoP Eu
2
abtcd PoP and
Push +
3
a t cd-e
wYie
PostP in
CC+/ abtc - e
Psh

Paye No;
a b tc d - e f yite F7,
IS f Ablix

1G atd-ef/+ PtS Po P
abtd - ef+ Pvsh

atcd*-efe Psn C

20 (rC abtcd-eFAre
Potkix
abtee-f/AA L7
P
C t chert

y
abta eF/tPi Pr
7
fik

The foslai cuin abt c-e +P-*


2 wte a Crrgram eo plenmene
oPera CioS
s nc bede cstoro.h
tincluda <sdalibhs
inclde euniksh>
6tru rade
nt da.

Sbvuca nA nunl V
ad L, n ewnod
epCurrent
weabe tabe (y

SCant ("4. ", dede ) ded,


CUent sAevENUL

Ytn Cunvent

Vo7d nsenkfirst C)

7 (head = mll
head Cucn hend neat bend->sTv:4 ead

fhead

Pnene unen
Cunt1nb hed
hed aMV: C
t
head cunenb;
3
Vofd inset lost )

Cwent cYcabe c

hco n ent
2vod -Jeveve N

rhead
hile (Pspexl! Mbu
PPnent
P-seat h Cuweot
Cqvneot ptV:

Page M 2
vbtd mserabsp C)
Phead

Cuent= acabfc

SeCd',afol:
spetS
P no-Aev (arrent
Cuwent-Mex P>nené
C ent-JAVP

Psnmat (uYent

Vo fd de/el e C)

h e a d : r NULL)

ehe v;

healc nt;
5 h cad >Amue LLfMawol
free

3
Vo

head lt)

winb 4( torty lire ")


nCntsNU)
Yoyee hecvl

rehros
i l e [P->nnl: NUL
e-lne)
void dolteabt
Lab Pos
Pchead
Sear &(4 Apo )
bile CiePr){
Pnent
P-Snet
P-SnonP4nenb
nat-sn V P

re()

e id displayt
ehead

ee

Prn +4P> dakn)


Pt-0t

Vod

Jle r: Twvu

Pe Paneats
nt manC)

while Ccn)

p'a (" menu


intf (" Jelrd one otion "
A 4C"Jasevt .dleh t 7.d'sdas, lergt 4J,
Sce nd ("-48h)
Swth (cu)

Cae
Tie fip()
brea
Co

breok
Co 3:
Trset atspO
bYtak

delese C)

Cak
ddde Frl;

Co
dl abs )
beab)

lenybscy

Chco

3
oive Ekc slerb»-stee Pr cod ure o Coavek 6louing faft
uesn nb Postfr a/uei

sa Given
Caxby.c-+ (d /enf/p+ 4\
sach Paut-fx Peerpt7o n
S.Mo Synbo
Psh

Push
3 C
ab
C

a wrie

C wie

PoP
a b C7.
twree 7,

a Cy
Poyh

+C a 7. Push C

abcyd wile d

+C7 cd push

C a CYde

3 +C ae ch de/ eoflwaike
Pvah

abCfdelP nibe A
+C-. ab C de/f
+(- aC8c/Pg wwit e2
+(-*
ab'C1de/t91
t(- Lnibe
ab CYs elf9/h* -

+ oe al

Haye
pesddn erpgesi
Noee as 13,b: -, Czds t7cT,e -13, f= 1 I> 2h:
SND
Synb oP ab2
Deerrbton

-2
of, 2-L/
6f9 VeP -21 2 p
ont Puh-3

Pth 7

27
Pu 4 276r

Pat 27Crds
a3r

-1437 Pop-H137

3
3 -19358

13
93 -193s

OR/en oc)L

oftof 2-l)F7 Puh


- L9 SI799
5. write
S.wTiea to m
CPrefamme plc ment prnty aue he
wi

So #ihclade2GAta.h>
in cladecst dtk h
Sivc

n dta
nb eitsj

Vi Cnqueue)

Sbn c pt, *he w1


ode

E P

new nodes daba 2


hewn ode Nistts 2P)
hewhe l Anest Wou

Yn YoW =
ncwnole
e ?E (reune de Mialts & Kort s pNoi

yone nd in o de

ks P

tenv2 fYay
hle (te-/-> Pf o
ikL new - Niaibr Jo teple vLL)

Pak ney
prevtemP
tmpatemp neue

hewno de >nent 2
bemP
PYe no neJhe be

ve i
Oequene (

P:hob

nb Delcts ué
PEv)dekr)

wb e Pb vshe el= A J
int maln)

int choile
ia q e ")
w4:le C)

Switch (the ie o)

bveak
C Deqee
break

Cos
ptyay )j

Ctu

Ek a
CShew e detjle corbrabs
Farnetu)
nueue C(4)

e) ea t

) enandy
3
Deavet

Oistles Coi-29-349

29y
Dequt C

D'spla

wovedee
*www.o
*****s

You might also like