Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
122 views
27 pages
DSA Solved Paper (May - June 2023) PDF
YGTYF
Uploaded by
vaishnavidhorje
AI-enhanced title
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
Download
Save
Save DSA solved paper (may - June 2023).pdf For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
122 views
27 pages
DSA Solved Paper (May - June 2023) PDF
YGTYF
Uploaded by
vaishnavidhorje
AI-enhanced title
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
Carousel Previous
Carousel Next
Download
Save
Save DSA solved paper (may - June 2023).pdf For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save DSA solved paper (may - June 2023).pdf For Later
You are on page 1
/ 27
Search
Fullscreen
Pas ~ Jun 2023 aia Write an. algorithm for depth first tra~ é evsal_of graph. — so 2 ) = Tritially define a stack with size same cis total _no-of vertices_in the gia ph._________--__--__, _ ep2. = “Select the root vertex as starting. __nocle for traverse. Visit that vertex. ancl push it in the stack, — s Shep 3.= Visit an | neavsest Caclacent) vev= — tex sof the vertex whichis _locetecl _____att the top of the stack cand which — Lis nat visited cand push it inthe J stack es _ _—_—_Slep 4 2 Repeat step 2 unti| there ave no — any adjacent _vextex_+o_vis) t from. __ the _vevtex on top 6f the stack, steps = Wlhen theve Is no any vexte.x_ __-remcein.to_ visit then use the me thee) of back tracking and pop one vertex from the stack, 6- Repeat steps 3, 4 and 5 until — _stack becomes empty. a, “4_-_When_ stack becomes completely ___empty, then_genexctte_fined_spanni- 4, tree_by —Yemeving unis fool ezlses fyurn the graph. Hh | G - >) Construct +he minimum Spcinning tee : (msT) fox the given graph. ting _Prim's algexithm starting From | vevtey~ 6ees) ats a TERT = ASS yt —~eilihad ja Appalagical ) Mihat_is_topological sevti 1 Find topslo-. —— gical cing — pew ee “sort isan ordering of ——Nertites in a_alixected acy clic: ger such that if theve js a pla 1 NOt Cj ee Spee otloy Eid in the caxclesingOr pate ah_ol aie fit _breadth Firs}. a _, Haversal_ ae ete ve ___slep] = Define Queue of 5} size equal to — totcl no of vertices in. a_gyciph : (i Ngre ep2- Select any vextex _as_s-taxti paint fox +Yaveysal. Visit thet ver- ©X_anel_inseyt+ i+ indo the, Gueue. ——-Slep 3 = Visit_all_ the. neavest _Cacljacent)_ vertices of the vertex which Is —oat font of the: Queue wWhjch is _ not _visitecl_and_inseyt these ver- ices, Inthe Queue ere step 4 - kIhen -thewe js no any unvisited_ ———vette1_semaining Pua athe, vertex et front _of the “Queue then delete ~fcpead. eaereelss ‘ae Eaphy step 6 - Ishen queue_becamed empty hen produce fined. Spanning — tree. _“by_vemoving— unuredl app —_______elges _ Near the” eaph. aeane Be byhUs Using - —Prim!s. “algorithm, Find the cost : of Minimum -spannin tree, (MS8T)_of - 42 sier— “graph satiny Ner-mst = |tsté+2z+3tlo = 26 a Oi Deline the. tallaning = E: 7 ____) Complete. graph — B cee graph 2 gaph nic hich ach wey oxo i connected 4 De other vertex = ph “Connected: gxaph— Bs eee om isa. Ded gage graph it for | / of _vevtices, theve exists La Lat | teat om single | cel which joins — Shem eee sy ‘Q.Ph _ 3D stub: £ nc G_is another. _ formed oe ateubset_of the. Ney ne ph.—@-3.4) Conshuck. an AVL tree by insevting, __ numbers From _ 1 > Numbers yy By ly 64-841. &fod CA heise fact ——, See =4 Define Red- Black tree. List its ‘pro = I~ "Gi Fits | ich tree osith recl_ouncl_ black “edlaw~ | facing racer be “: |__P Propentiosa” _ i) Eveny mocle. is cdlouked either red 1 ov blac di\ The root is black : (iS TEE node Is red it'c _chilel-ven. bey of black ocle BE ample — c= black node | _) Se {made Do-ved 1» CTs. (OS at aa ou 6) Write. fictions for _RR_cncl RL_vota= tion ithe spect Ap _pwL hee. —— —_. ea Fe DRR (Right Ro tation )_ a : —Tn_ RR Rotation every. “node. moved. —IL SL se tole Ras Heat fe Pour, 3% RL ant - lef} xolodion) RL “yotation is combination of _single sight ryotetion Fallauedd by ingle. | ee ~otaton, ps every made mover one pasit/an to_aight _Anel_then lef zi =e.4 cee ae is [_CxR Qe [Re Tee ao | QB L : z _ oO y G4 a) Construct — an pV tree toy “Fallauling— Lata | So, as, JLo, SP, 3,30 2042 IS,: > (Explain “k- climensianel tree. a k- ctimentianad tree \(ktd bead i Us. Ss ace ~Pspetitinden pastitiening — dade fon iS hucduye. Ty seating | pai bs fin k= climensi lip The _k- ca tree. [s_ae y itp which every ‘léciB.rindedess is 7 Ke _climensional: BE ES g/t enone ne et) RE PSB very —non=leaf ngcle can he, - i Of. sine icity. genexoutin Ley s) ing. hy petlane_ dee valiuiolts, _—— es i info. dwo_parts., -Kinown — asl: ty. Points te the left oF (oh this Ripelane dives nispemiotedlash uth @ cies bach b = tree lof that— atle —cund paints to: e ight of “the ‘hyper lane tore Q presentec! LPeranirin We bre | ~tree wera trees ave uselul dota Sshucture tox severed a plicctions, suchas searcher jnvdlving “a ru — BES CEC epee cll mmeene ee eeee —Ni)aK ~cl_tree ave ct Abecicd case _ FE binary, space pootitioni ing ig tree. =e = Peeled — stadia and_ olynamic.. tee [es__with suitetble. example Zz Static tree table 7 — Tha static Hee table _symbdls__— ave move jn advanced no insettian eincl__cleletion ave ettldwedl. — Huffman tree end OBST “ave &Ka-____»mple 9 stale ree ble. a cme of Searching a robe L occuring =jealt jhishe pega: Sena 8 smcu| e.g: ‘onsT a ‘Dyndraja tree. fable * Tn a olynamic. table Sjinbela xe, inseytec) tet wee then they éome , thew axe, deleted when they —cuse St =avl Free L an examples ot clyng- mic tree tkuble. ay as. ‘as Conshuct a acizae Wal male. 12 by. jtinsextting “oumbexs | froma 1+y_1o "Steg Fnsert | | C Oo : | “Step = nsevt -2 “oe Step 3 ia Thsent - 3. _ —— Ct 3 : = i 5 Cover flow) — st ae tp Tsexd. a| . a ! 31 4,5 S| Os __ | ‘(Ovex Frow) A 1 * i Step 6-Insexvt - 6 A - OO @ fey = _Step 7 ~ Enseyt -7 Cover flow). HG Tn). =o @ Ger oS (G3) Or Coverslow) =a ron ae O@ Hath pai bes = ~~ Step 3. a _Frsert= 2 - 9 la poLs — | —__tiue i “Step lo= Lnsert- lo EK ee J ee an) x CT LL yo it TE Ts] pO lao t= DP Eaplee. y- _jnclex.§ sf aa clense ln clex p= . i _ DS Peimars index. L Here. ey ‘Fedo piney, igh [ean ee anlly the p pyimaxy V yeletion in the table. ‘and ‘primary I index _{s— gdetine —a_a ard exed — datafile. ns — so the date. file ~ je_ovclexed_ ana this hs = see ieeei) Seconclaty index = it, i a = Secondary inclex Is. ct Field which jscanclielette. key, (-@. the, oot oth- cHhewn- pximerry” Ae oor_—tnan= ar _clupliccrte, EUW, es nayse—Ineclex — te 7 Pavel ex —ecorel_ contains. aaa —_anel_eiclued pointer to the clea shined. _ago_+the clisk =So the seaych the secorel_ we fixst needed _inelex_~vecorel_ to each at the cactuct) location of +he clota, _=_Fin_spayse__jnclex_ pene secur key = el at not creéttioal. yy. Dense, index - te ? = On primary k¢ as well, ax_caltumnt,— — indedin. gis! she ak on whiz form Fransecttiong —Que cannot execute — an con primey. key JJumn 7 oP : —But creceting jnclex en primary boy will not sufficient hence ie BL fog te ee allt __the_seaych__k cdlumns _js_storeel kisim ethocl. is! -callecl_slense_index,—_ &6 a) Construct _a B& Tree, ae “oveler. ——_ with the ollo. wing cedgs PH2ZEaAPQEA SW CLA ca E| step 2 ext. [a sepa - Inseyt 2% [i ee ‘step ye Eel kK 7 7 GSD _ O. H kz) [ ae CK BYPaeteie KLPL as out Wy Jn} a ; aya] p JE) is j are } E] Ixy? J <[-spit clA@ 4} ~—fBre? Io Je Tkres_ |S Jt)I rab LN a Es = be Jal aret pie) i Np) [sjrJ ta _— arsed —, re : = ao < pe Zt H Je NS | TBI RE 2 — = = ae —_ H [Dm ai EE pyr B B a: a — ~ ealian am ib 5) Tie: tree - it pipe Bee is a Nery shinight — sis Lt isa imple trea where the nodes “them _th. these, node’ ae, akka- ligecl fs the, best part of the Trie- hee 2 Tasextion in Tie dada bru cue, = A) getithm = Define a fur? insert (tie Node * é Sook ishing & word) whit in —__ rameters on! Other Foy the dxing., 1 ~ 7 = initialize it with the: xeot _Node and ino 2%. Ttevate over the \ength of the Fe i F S ig_N0LL oY not In the orrey of point - a | th rent character of the Sth & Liy re NULL then, make dn new hed. cand. point the curxyvent-chayacterx +a thr ~~ new pesbetenpenae ti os li} Move the cury to the newly. ly sxe Mo—____| _ - Lae Finally, Tnevement the word Count of [ _ | the last cur sicent Nede, this tmplies—thed there _is_a _String_encling—cue vent Node | Search Operctien= » Search operciran ip_Ixie i performed dpa Lnotlay Wau as The Los exti an poy cotian but the! only olf femence. is Jo. biat wWhenevce we find thatthe oti. not l of_pointers_in_cuty nods. “clae poi tp the current character of the He wworcel then acchinin al ls, ps as Find) cohetber. the. given word exist | xie \. Find) wh thee any word that ster wi LK the given _prefi ext fe jn Bie | @.1eS E plain youltilist files and cova) ing —> Multi list files = = n= multi -list file organization the fo ~ index _cantain cl) valves -Hna_the secondaty Key hey in olata file. “same cs inverted Frle = But the. cliff evence_is that the — centsy inthe sm witi_inelex_fone_a_—— secondary key value _ ts_ pointex. to— nee ded rrecerel with that Feg- hve Mia oe ee eee a SE LER eeTa beer xing. structive is same cy de cloubly—linked mut). list: chuchixe Ey p—hi'st fs _s-yuct asa _ciyculor, _——_pié ~ca_head_nacle. + given _circulax L'sh,_ail records ae ies form another. ci¥- x Reverse civcular, list contains neole ik cp . obit ha What is Segueotial ad laser seo) and index ie —— fle eganiadtign® State. [ts_advers Hounal eli'scdvet —7" vite Sequential - Li) “Loa aquential: methad of fF 7 izahien, Yecards a aS —_anizahi Sea rourTea ena —_.attvangecl_in_the sequence | ces by which they “Were. dea ihathe Gd. ii) Et tk not _passible to insent anew xecoxe _cuny, where. inthe file, —___“Tndex_se sequential — a i) Pn index fora file sis a Ii — 7 Ks ae Values app earing—iia the “Hild aon _with_ He addy dvees of the Foote dine aici inthe mass Las Stnwag 2, orn 7 x il “index can be. ¢ oxganiz eus_o. lis Sy The tree, —a_lhosh table, ete.Multiple inclexes 2 each bh pe of field used tox -sembeching VAus nelexing—provicles_much—_berlter, = § Flexibility —_____— a -* i Pn_index file usuctlly 129 wie. lens storys space than the nain tile. —___—____ iii) Updation of index ti ile cequives fewer _ — block accesses compare 10_Seq Le file — : ae "08 9) Explain ivent inuevted and cellular 7 = partition : - 41 : _—_ f Taverted files ‘ | = averted files are, similak to mow = } __lists. ; iL = The_inverted files ~ecord informe tian | _-lis Kept in dhe iinclex itself. —__ s | > Benefits — } c i) The ~etrvieval works in two steps, i) The. wecords are etrieved using the ___tij) Fnverted Files resi} in space saving — a oogirred to_ other le_stwchine. _ y search aneceneen erR ae isceus OE Cellular partition -—_ = Fn order. to veduce file seaxch H=— mes, the storage -meclia —mety_be._clivl=— ‘ decd: into ceils = : =A cell _mey be an_entive.clislk pack — $ ot_ it} may simply be a_ cylinder. a & -— Fn cowed. a cell is aidisk pack henle ing _cellwlay partitions it isp assitle. to “seaxch—cli ent cells in posal ‘Explain_clivect— access file org, anization. state its advantages nel cclisacvesnta- an gen — i —_—— | = Tn ctivect dddvecciey with equi = ne ———necovels aveuiletble clisk_sp pace. 1 clivi- chins nodes lage emaugh bo hold) ol ve carel =Numevic yelue. of primary Key is used to_cetexymine— e. node. into which a — pasticulay cecorel is tp be stored Advantages = i) Sorting of the ecords are not ivecl : : + access i el pmmectiately Wis T+ har better contra see allocation Disadyeunta ja i) cloes not pravide back wp Facility, This expensive.
You might also like
Red Black
PDF
No ratings yet
Red Black
11 pages
Final Report SIH
PDF
No ratings yet
Final Report SIH
8 pages
AlgoXY Elementary Algorithms
PDF
No ratings yet
AlgoXY Elementary Algorithms
749 pages
Dsu Notes
PDF
No ratings yet
Dsu Notes
110 pages
Chi-Square Test, F Test and T Test Examples and Formulas
PDF
No ratings yet
Chi-Square Test, F Test and T Test Examples and Formulas
12 pages
Data Structure Notes Part2 Csegyan
PDF
No ratings yet
Data Structure Notes Part2 Csegyan
13 pages
DSA Unit-8
PDF
No ratings yet
DSA Unit-8
28 pages
Unit 3
PDF
No ratings yet
Unit 3
39 pages
DFS 2017 Akash
PDF
No ratings yet
DFS 2017 Akash
12 pages
DSA
PDF
No ratings yet
DSA
10 pages
4a.dsa (Detailed Handwritten Notes)
PDF
No ratings yet
4a.dsa (Detailed Handwritten Notes)
108 pages
DS Unit-II1
PDF
No ratings yet
DS Unit-II1
46 pages
Trees!: Tree
PDF
No ratings yet
Trees!: Tree
9 pages
Dsa Basic
PDF
No ratings yet
Dsa Basic
23 pages
Binary Search Trees
PDF
No ratings yet
Binary Search Trees
19 pages
CS Practical - Compressed
PDF
No ratings yet
CS Practical - Compressed
27 pages
Govt Based
PDF
No ratings yet
Govt Based
19 pages
Algorithms and Data Structures.
PDF
No ratings yet
Algorithms and Data Structures.
10 pages
Case Study
PDF
No ratings yet
Case Study
6 pages
Daa Unit 3
PDF
No ratings yet
Daa Unit 3
16 pages
BLACKBOOK
PDF
No ratings yet
BLACKBOOK
5 pages
DS QB Unit III Answer
PDF
No ratings yet
DS QB Unit III Answer
16 pages
Maha Revision DSA Gate Wallah
PDF
No ratings yet
Maha Revision DSA Gate Wallah
71 pages
DS Notes Unit 4.1 Tree
PDF
No ratings yet
DS Notes Unit 4.1 Tree
44 pages
DSA Beginner To Advanced Guide?
PDF
No ratings yet
DSA Beginner To Advanced Guide?
110 pages
Unit V Tree - Watermark
PDF
No ratings yet
Unit V Tree - Watermark
69 pages
Data Structures Part 2
PDF
No ratings yet
Data Structures Part 2
13 pages
Data Structure
PDF
No ratings yet
Data Structure
15 pages
DSA Unit-4
PDF
No ratings yet
DSA Unit-4
9 pages
7 Red-Black Trees: Dictionary Data Type, Which Requires Support For
PDF
No ratings yet
7 Red-Black Trees: Dictionary Data Type, Which Requires Support For
4 pages
Red-Black Trees: CS231 Algorithms Handout # 21 Prof. Lyn Turbak November 2, 2001 Wellesley College
PDF
No ratings yet
Red-Black Trees: CS231 Algorithms Handout # 21 Prof. Lyn Turbak November 2, 2001 Wellesley College
11 pages
Daa Notes (Final)
PDF
No ratings yet
Daa Notes (Final)
41 pages
Binomial Heap
PDF
No ratings yet
Binomial Heap
7 pages
Unit 2 DSA Notes
PDF
No ratings yet
Unit 2 DSA Notes
36 pages
Cp4151-Advanced Data Structures and Algorithms: Unit 2
PDF
No ratings yet
Cp4151-Advanced Data Structures and Algorithms: Unit 2
100 pages
Tree Data Structure
PDF
No ratings yet
Tree Data Structure
13 pages
DS CS3301 Unit-4 Notes
PDF
No ratings yet
DS CS3301 Unit-4 Notes
52 pages
DSA Notes
PDF
No ratings yet
DSA Notes
31 pages
Dsa Short Notes
PDF
No ratings yet
Dsa Short Notes
37 pages
DSA
PDF
No ratings yet
DSA
28 pages
Data Structures Notes - 4499ec4e 7cde 4f0a b760 70a0ab99f63d
PDF
No ratings yet
Data Structures Notes - 4499ec4e 7cde 4f0a b760 70a0ab99f63d
110 pages
DSA-Unit-2 Handwrirren Notes
PDF
No ratings yet
DSA-Unit-2 Handwrirren Notes
24 pages
12 TH 13m
PDF
No ratings yet
12 TH 13m
5 pages
Dsa Notes Unit 5
PDF
No ratings yet
Dsa Notes Unit 5
21 pages
Big O and DSA Sketch Notes
PDF
No ratings yet
Big O and DSA Sketch Notes
12 pages
UNIT-4 Data Structute
PDF
No ratings yet
UNIT-4 Data Structute
42 pages
LeftListHeap and BinomialHeap
PDF
No ratings yet
LeftListHeap and BinomialHeap
14 pages
DSA RG 3rd Sem
PDF
No ratings yet
DSA RG 3rd Sem
71 pages
Unit2 Daa
PDF
No ratings yet
Unit2 Daa
5 pages
Dsa BCS304
PDF
No ratings yet
Dsa BCS304
29 pages
DSA-Unit4 Handwritten Notes
PDF
No ratings yet
DSA-Unit4 Handwritten Notes
20 pages
Trees and Programs
PDF
No ratings yet
Trees and Programs
21 pages
Unit 3 Data Structures Notes
PDF
No ratings yet
Unit 3 Data Structures Notes
46 pages
Data Structre and Algorithm
PDF
No ratings yet
Data Structre and Algorithm
109 pages
DTS Assignment 2
PDF
No ratings yet
DTS Assignment 2
14 pages
DSA Mock
PDF
No ratings yet
DSA Mock
9 pages
Dsa Gateway Unit-4 Trees
PDF
No ratings yet
Dsa Gateway Unit-4 Trees
172 pages
Unit 5
PDF
No ratings yet
Unit 5
34 pages
Data Structure and Algorithms
PDF
No ratings yet
Data Structure and Algorithms
7 pages
Graph or Tree Data Structure
PDF
No ratings yet
Graph or Tree Data Structure
53 pages
Unit - 3, Data Structure
PDF
No ratings yet
Unit - 3, Data Structure
23 pages
DSC NOTE Handwritten
PDF
No ratings yet
DSC NOTE Handwritten
9 pages