0% found this document useful (0 votes)
18 views

MCS-021 3rd Sem

Uploaded by

D star
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)
18 views

MCS-021 3rd Sem

Uploaded by

D star
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/ 29
Course Code: .. Assignment Ni Study Centre: pee sot 25% : 31% October, 2021 (For . 15 April, 2022 (For. This assignment has four questions which carry 80 marks. question carries 20 marks. You may use illustrations and explanations. Please go through the guidelines regarding Programme Guide. All the implementations should be in C programming | Question 1: Write an algorithm that accepts a Binary Tree as inputs and outputs the traversals Postorder and Preorder of it. Question 2: Is it possible to implement multiple queues in a Stack. Justify your answer. Question 3: List the names of all Sorting Algorithms along with their Complexities (Best case, Average c and Worst case). List as many names as possible along with their year of Invention and Inventor. Make necessary assumptions. me Question Show the effect of making the following insertions into a Binary Search Tree which is already having one node consisting of 91 (value): 50, 30, 40, 60, 10, 80, 90, 5, 100 & Mt). Visit and paint tho meh odo ic i s lao (1ot=> sight) : Procotlos (samt) £ a 2 Lo} Trawerye sho subi sisb-tnae —_ al “Geant ) Ostia cle Sraogok dt jodude data == nf) iY dusteh (ln) £ (ayo! s srogah > alt = nouoNore (n2) + ero ales Gig marin Sak 9 alge = rewAbode (nd)s hooks caulk < sept -> duly 2” "5 jaondox (moot > sight) pewartcle x 12 _paiak Sonsin Nostnnch Posnn dox ft rain Functions [ lak man () Bruck node * mot = NULL: Int ny W << \n fator tho Wuimbor Cin > ns aur A Pn ingeatr rede Ln q 4 Cou “<< \ylnondo Trowercal 2 ys lander (nut, Conk <& onc) Cour én Crea oi Tralee (mondor (aeondt) * Cou < endl: e\ Posto rclos “hordes Traversal + Proondox Travorzal + Posto dev Treworsal QuU2 51768 124 79 $362 974 52 B6 34 aa Paves soheanod ) (0x0) drecibyn timo + 4. Ponte tary Koy dn continuo Pdinond |} tL Plage, CORT on clificont onda} 0 7A Enguieus Firdrout an bo plo ont do (Vsesse D/eowntion human Shamma (210081880 Ado stack add tp tuck + Raxh y tp p Sh peng Hise Bow fompbrity pill -bo 0 tn) doMuous (4): ¥ +18 stock i ‘hen erin + Pop na um dom Cad andl phot th Hong ‘ims teoerphoxi wid 4; 0(1) UL t++ pmasum tb Jovgle mend flioue te fios _Stchs ith ost, en (llue 7 eal Hinduade include < gtd bh? @ Shocks n Suck nodor fouck wNodo “f jar dasa bruce -alade™ poxt fundion 1) pnd min itm Yan five fat pon (struct sNode £F typ nal), xe Mxucilins G1 quouo Ravine han Sacks Bruck §Nodo® Mrich chuck SNale Maclds a F Furctinn tp pled an idm ty quoue *) an onldussse Conuct puous® 9 int-x) 3 auth (hg > each, md E ‘ JE fanstion te dolucue gn iter vino! qusoue *y U Ink Aollusue (dnack quest 9) f \ fink xs Zeid both uch ano try chon emnten™ Yinckd == A £0 g > sha 74+ 5 " ont ("0 is emt 0 4 - 4 - 6 Sn Odo no, node = («fn Alo do a ‘ ye pop (09°? Hick?) sohon ‘x; gio rate pode */ Cises| (etut sMade), Re J Lies noo = = All - pact ("tcl utes Not) o 7m 3 ~ are OxXtT LO)» node ? daly = no F fincas 4 — ee sell foo Catack fog A t Ind ord: Shack Mace top 4 Pay etn i empl “Hon rom i “(bo uo = Crue 4 else f eit \nDs get han 1s “ont (0), inp =* bo - Chou man Shawn Ie . f yavte sunction = Sat main ( { 7¥ Conle a ai ta &rou guaue® Cenk gueve)) s fe Muck’) = Alii, 2 gach? = AIL on Oyou0 ly, 4): ale en Ouro (4,2) /® fy tomy / painkt (% A” y do Que pact ("AY ‘Bea pact _(md" dala GI orphusin 0+ nthe On ‘Gluck tian shack ‘ Pwltomg Space: vm al Mack doe dfpoing vel Y d 7 Pha cman Chow 00% 280 Renin df asesono Mg Dike 1 The defi esa at is fn cae int seangh Cink a, int n, Ink tom) f Int fy ton (120. 1éps int) f YS (alia = = Hom) f robin a Li ha war homo (Gro Bi\8%0 an Pant “andl a ond. ho a} Ho Insertion opmction : Ly Ay pH Ss ee) ae al ae Combed Uin-Soodte di Ee {I P oe nd pod yw» pont tr place 23 in be ‘To thes 4p a insedled, ee aid tho thm (aoe thon i thm 10 fewe c.m00 th | | (tI Tayett 100 tees with 5z gince 98 is ager pe | ynove Ane oe 5% ore sto cto the tht, Hoare use cid? 1 putrad of BS pols ono thoypanision Ba ar Og s 4 YU pla oe kon =a Py hte Go= ode wlohe) o dit = af5T, thon the oko p70 Toxn mith « Son 0511p ali aia the dee panst 5o oni thin al, 4g Bropye ann ono ee insan Seana’, - asta nen ae ane Hae I —s ¢ tag ngol tho thm 18 diag an Gort Te tho 1s ay Aood ty et Ome fae auntie ine Dowdle is mean inpentat Han bot nse in tho fom nsegtion Az Ano suerte oagt case 1 I. running fimo U ~(ase _pornlasman a Hho alganithn U Bs, 1 will” Cea jie aml Ce CA re 92 pupal mon Sharma (21008 R80

You might also like