0% found this document useful (0 votes)
19 views24 pages

Datastructure Assignment

datastructure

Uploaded by

devkarnikhil10
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)
19 views24 pages

Datastructure Assignment

datastructure

Uploaded by

devkarnikhil10
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/ 24
FéSignment No pefine data structure . tis gut difFerend 4 dota structure WPes_ oF ay “A_data (Sructire 16 a set pg domains p, a designed ae o—Stt nt fundions € ond 6 @h ag On x10Ms He tnple Dif. A) denotn the date yO UH dand it will ‘usu Jig written 9 4, isha : pomMair er ohyects 2 Func on tf OF Dptrotions that con our pn the data objechs o ANevomns CF propturtitn ONd vrules o¢ Opurations i t Hf t 1D wind Nor £ 3 t x dy Hor n lynomel \a")s oF the |polyno Jerr of # + Y 3 se Shen a me —— 23 aa < 02 PrintF C'+"S5 Ise if Carray Ci) 48) a “ROINEE Gm Wey Inte (n-deMdd “1, obs (array CIT), priate \n Gun of the Polynomias =. 8 o. * Define the term & p1o-Ceenevadizec! inte a) -, Hi get F > gee radizac c elements a, od ligt & a r hoy b) Bi how) +s kare f . & his baged 9 Aguea_} Sea OpPOach divide -ange } M Cra ye or we cursive. notation o¢ on olgeninm : Fits Com pleesty io hick OM calls itself direchy: led. ursion” and the nection ied Recursiet AUNUd on of show the postFize exepitss? > [S010 = Te postfix expression 16 AB yeD~4g/ ty 37d element is + Evaluate A+ 1 Sth eolve te Following « Pyusing Heap Sort Barts, 64 12,75 67 (S91 80 cr oF daha “aye sort Consider whe Following Get of Sort 1M . Wlending order. puraton | 2 Acta te be deraHon 7 ©) Rebui it ) Sy f ) (3) S) Reb —_® Altning the Sie OF block peallou) I Foc) funcdon alipaky a Now MeN o | OF Atte cize nwd@ze to the pointer yayl I Gnd returne tne poiniim to the Five? b Na memoy block. b) fie likely thar we disuwer lator ithe | Previously all occa Memon is not ouPriueR and we peed additional Space for More elem dt 1s 0180 posSible thay the Memon alloc '§ Much larger than Necessary and we Wont Or rt } th cace , then. the & MeNk , pir= alloc (ptr, newolxey is ASSI9NM ep he prhix Noraon o 94 | Explain differnt typeo oF AVL Totahons wo jan example. : =| sn 1969, er. Addson- vase; and EM tend I Introduce @& method te balance a tte Gal} I as AVL ote, Ohut tre is balanted With { yespech te height of the Subtreco. There ae four cacw of rotahOn Possible: | @ LL rotation s 5) LR yotaHon O RR yoratlon A) RL rotaHon LL Rotohion ClePE- to -LePE ‘Oger tion ) os unbalante ocurred due to the inserkion fy tne left cu OF the Jet chilol OF Pivot node Exomple pier ance Factor =2 © It inVolven teon Totahions for Me MaDiPWoation FE Gubbre (DL) OF the right child oF th PE child of the Pivot Node CP) becomey pavoiarton {ey = => 4 ty a Moe yf @s| Eeplaun adjapapcy matte And Adjacenty lise with suitable example. 4 > _@ Adjacency Matrire - a)*T] w) represe) i 3 b) ley G=CV,e) bea graph th “nie fin _adjotency matrix Of & 1S a 2-di mension AxN_ayray | SOY A, with Following property: A CiICi) = Lie the edge LUjsuj) Is In EC) O if there is po SUth Cdocin & fF the Graph W und d then FoGRren = VOyy Cy 2] J Exompie consiruck adjacency Mats}. \ is fOr FollOleing graph ie a

You might also like