0% found this document useful (0 votes)
21 views14 pages

Adsa Assignment3

Assignment

Uploaded by

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

Adsa Assignment3

Assignment

Uploaded by

kuchbhi323232
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 14
Saag ya Sal / 6034 PAGE NO: =) pate: 1 7 Assignment 3 “Section toi 04 plain Linear dita chucture STACK with the Aap of —aeat time example’ > A stack jaa fimeay ‘Dala shusbore — Last En Fins Qu\_ Curlo) pameiple. “This —Tneoms the fast element added fe the stack wi be ine pire gut + be gemoved _ a ca 7 a 'g ack to. Hye Vundo!! fegkuxe [nord Pracessert 92= . Dyowsers . _tohom you _pexbmm an_achen tk io pushed nin_the stack» and —Pyessin “undo' pop h t action © FF r reverting the Sta yes - — ~@1 Wx implement __ tach using ee _ —G)Eaiialins an_orray Stack 45 She 21 nitalixe a variable — “opsat Sem ipa pexabion ne (a) cheek “Uy Uope= mat phen STAC Over flow! — ——— ——y ra “not, _ingement top and seat the mein _element ak istack £ Aon) ———__ — et epexation: = Cs) Cheek Lh ‘Yop == -{! then Stack omshery! —— (6) ip not, eka stock Ctop] and deucinge ( —____ Peek _ppewatten (2) Checks if ‘top ==-{' then Usteck Jn utry Ce) it net, vetum 'stack C top! — ©24 Discuss application 44 stecle im yea) world ___ppljce hoor “7 (\)_Stacke ore 6c a\ushe esc perma _in _compijea - (2) Tn wecurxsive Junction a set cad 5 pwhich elles pack pec! pg —— i — — = <4 Pio) oe ee 7 ns i. Coty Sarvgra _ BA tubis— the sme conpleaci Hes of, enqueue / _ amd Degueue operations im cieculor Deve. Ins —-Enguene operation Cinsey ion) 2 OD FPaqueue ner Yon Cietetien) = Ott a ae Crrcula “Queue raindain constant y eperite _or—a— fincesl a Size ond yotale 4th ad and seth pointy Iya ether fashiow = ag Wak advaniager amd Disadvantages of — * Advanlege/” ae C3tatky> | <7 | 2 Enany_—is —impleanen— and uate Certain Lgea dane | > Sul le. avinw Uke revere, | dete. ay taldlag hideay - 2 Dicodvan heger — Le / Onty the _fop_elementr con irae eee Ng oe a 6O34 ( Pase no. : Barvag ya | owe: > — Advanta 9or af Gueue'- w—__ > Tadeo) der seheaulingy | lask , protest may ~~ ele, + Suitable her scenmetes tibet beatin — hie storey — —- ee —Dicedvantage oD ae to_ Stack que er colle accew Ayr lhe Avon ore rear petra ndere acer = -? 7. Si2e queue, circle queue AMUN fp impdlment- ai ae Seckion 2 — vr — 84 Wan algaetithin pi tenes ng toa sh oi te Bp ao one~djmenduyed -a295)? ge xy to tn implemeit hon slacks in a Ge single —Orre% ps are y inte hoe _hralver oy. ‘Stade gelloa. phe — tep2 Wen Stack ee — - overflow’ _ Ww) if net tn ovement ‘top! ancl inseat mer element ot ove inpt I! PUSH Cstack2)% rhe 7 aoe an 1 | 6) ip not deveonen} “op 2! and \nsext +h “new element at ax Ctop2] Por (stark): D_Check if Stopi=e=1' then 'stecka iy Hn deaf 8 TE net, decrement ops! d_athurn arf hpi “PoP (stacked. we (3) Check uf top ass n2_then_! Strek >. ere underflow ne P oot" raceg? =) Sev at i Mel 4 if mot, veto laser Ltop2 | 9 Mding, pet ——_4 Qe Wail b PUSH and POP algerithn, Implement stack, “ashag linked tip — __ => Ina s Sack —Ineplementa tian _Usivg > agate pile tat ASM do rh top 6c sho Zach moa hard tudo Hela: Dates OMA the yese} Pomber-. - PUSH :- ) Create New node — a \ B = Vealuel (Ue vatys —_ ingenel ope tebe Cain a ne oo ra es MMe a newntde! Gag =~ in Ste stack) SBR Nhs nected ae —___ ————_ € —! i for - —_ _ + (U Checle if \fop == nui" then Stock Un dbonbémes!. @) not tate a temporary Node Uemp> bp’ (2) Set \ top = tnp => wept! Cmove peraler fe exh) i) Rorvm “emp > data | Cralue 2% pojepel feds) &)_ free Skwapl Cadets te tapes nade) _ fs] 0K Loe |x] fop _ |2 ] Lee Tor _ = — ; oly] eby _ Qu-3 Wette an algorithm for converting on birt -——— 2ina toons eatin tele of — ao alae a ee eT Cody Servegyr ——— The Inge encpoession —_la_“he -Stondore Abs, _— Gohan _eperatorr one _beburtiaOprxe.' dy Sg AR). The postin esepacimting | alr ly — Od Revert (Pe\wh_ npectatien CRIN) p/ Se “a —_ Sree wo Kp ps — — ne Algexitien = ee D- ielize an empty Stack 'S’ der ope nd__an amp bing, ‘poad fic! hor the eae @utout . fer each ‘ch! in the intix ex preston _ {o) ib ‘ch! tn an operand Chumbes- oY Yasjaby| Aten kbp ft gl ent 5 A 9 " tel oth Nha Stack. : dich in a aright parcMair S)! pup fae Ye “Stack om append to ‘PortAnd’ — Wnvit a Aap Per tm tao ntoun kes _ Dittord the Parentheses — ih sch oe —an_epeseber (43: hewt SAW YX HAGE Ne: pate; = while he mpoator ab ta bp a6 SPECK hey ——grestuc_ayx_equas prce dante than 'th? Pe fee tes stnck 9nd apponel pp pes hye _ _ GL) Seen the | Pasty) eoxeptcuten » hei _ tnfix > Ay Rae pethix = )ecxs Sectim -3 Le =r ee ee Queuc~— ene ef ——_prienty -gtered iq me orks, amy each element dy _ toned ov prtoribky tsheay nse __ De wy placed abe patty. _ ae a ——W Create an ee tos tort_@e_elemun end tain Qrlowtes to tynen pe seating » shift clemenb—atces dng — 42 nein aig Hye paternity 6xden - ——_&) The Clement wil fra Ijethpad- Poicrity i —— Io ke ne face» — = RE np A Pi ° In Vain memned » we pte oO Mnled irr LINIne 2 ach odo centeimc data ayd’ Dis & seating inks dre Ut moguiyes oy in ane Joy yo bid Hee Censor kh Qosi Hen Ag wmalintaly px Udy orden, tb _simovel highest Pridsity element Can pe ty DV Sinee jk bk Vhe head — A the ty (y Create a Swked oye coho: each nade fork? \hne data Priest! J a a rvert a ners 6 bby Baling 4 coxcect PesttisA Paria on parody, 0 _/ we ! OO 57 Saggy & > Eee — lth Pik twa) lane Creeps — eal) hip ; - ee gaat nd eeocre (po) VAC at _Uracy p i - Ano the andqy. oo a ———b) dapie Ended Querc COeGueie = : Sy SO A Sette a garvaliied gma of te > _ IM sey t__xcay La, 42] L. insert vey ¢ Ta Oa] ‘ delele fienE . D%* oad - wa i ! = ). Conver} - the follooing. ini expreratva— FO PONG walt je bp 26 —Statkin— SM) ABAD E/E aR Re c+ AG-DE AE [- C+ AB-DE* F/-B BR ok a AR-DE*E/-B C C+ AR-DE*EI-BC 5 ) _ QR-DEAF/-RC* + Ne a Osay Servggya nieve +] \ | [ym eng = j NK KEP. ———_ i =0 REBA cE ) O ue Posty. ARYDEEE -A ®) Evaiuare the po tpn 2oprernrjan ~ NF RH 24 Spt wey t LLP Sting tac Pe 2 {2/4 ADR Lay si ate 3 ——— are! __— iy _ + Se Sa _ weer a ay Fina) 7erult = ~ yeqult = Hie 7

You might also like