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)
141 views
20 pages
SCH - 18CS32 Aug 2021
Uploaded by
reddy1984
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 SCH_18CS32 Aug 2021 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
141 views
20 pages
SCH - 18CS32 Aug 2021
Uploaded by
reddy1984
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 SCH_18CS32 Aug 2021 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save SCH_18CS32 Aug 2021 For Later
You are on page 1
/ 20
Search
Fullscreen
the remaining blank pages. ten ep, 42-48 answers, compulsorily draw diagonal cross fines 1. On completing yo Important No willbe treated as malpractice. equations 2. Any revealing oF identification, appeal to evaluator and, CBGSISCHEME 1 1 usy | | 18CS32 Third Semester B.E. Degree Examination, July/August 2021 Data Structures and Applications Time: 3 hrs. Max. Marks: 100 Note: Answer any FIVE full questions. 1a. Write the drawback of static memory allocation. Explain in detail the different functions of dynamic memory allocation. (08 Marks) b. Write a program to search for key element in an array using binary search, (07 Marks) c. Write the difference between structure and union, (05 Marks) 2 a. Write a program to sort integers in increasing order using selection sort algorithm. (06 Marks) b. Write a funetion: (i) to find out the length of the string (ji) string concatenation, without using built-in function. (08 Marks) c. Write a program to search for an element in the sparse matrix. (06 Marks) 3° a. What is stack? Write a program to implement push, pop and display operations for stacks using arrays. (08 Marks) b. Convert the following infix expression to post fix expression: @ (A+(B-C)*D)AE+F) Gi) XSYSZ-M+N+P/Q (06 Marks) ©. Write a program to evaluate the postfix expression. (06 Marks) 4 a. Explain the drawback of ordinary queue. Write a program to implement push, pop and display operations for circular queue using array, (08 Marks) b. Write a recursive program to find out the GCD of two numbers. (05 Marks) c. What is double ended queue? Write a program to implement the same with required functions. (07 Marks) 5 a. Write a program to implement queue using singly linked list. (08 Marks) b. Write a function to search for key element in a list using Singly Linked List. (06 Marks) c. Write a fuunetion to delete a node based on information field using doubly Linked List. (06 Marks) 6 a, Write a function to count the number of nodes in the List. (04 Marks) b. Write a function to perform the following using circular doubly Linked List with header node. (D_ insert_front + insert element at front end delete rear —> delete element from rear end (08 Marks) ©. Write a function to add two polynomial using Linked List. (08 Marks) 7 a. Explain the following with suitable example: (Binary tree Binary search tree ) Complete binary tree (iv) Skewed tree (08 Marks) Gi 1of210 Construct a tree using the given tree traversals: in-order : GDHBAEICF post-order : GHDBIEFCA Write a function to create and search for an element in binary search tree. Write a program to insert an element in to binary tree. Write a function to traverse the tree using (i) pre-order (ii) post-order in-order traversal Explain Threaded Binary Tree in detail. Explain the different functions for file operations. 18CS32 (04 Marks) (08 Marks) (08 Marks) (06 Marks) (06 Marks) (06 Marks) Write a program to sort the array elements using radix sort. Show tracing to sort the given array elements increasing order using radix sort. 52, 43, 24, 67, 78, 96, 81, 63, 27. (08 Marks) Write a function to sort the array elements in increasing order using insertion sort. (06 Marks) Write a program to print the reachable nodes of a graph from the source node using BFS method. (06 Marks) Write the adjaceney matrix and adjacency. List representation for the given graph in Fig.Q10(b). Fig.Q10(b) Explain hashing in detail seeee (06 Marks) (08 Marks)Subject Title :pataStuclad & Applications Belagavi, Karnataka - 590 018 © Visvesvaraya Technological Univ a Scheme & Solution Signature SrRcrataizer Subject Code: [¢ C43 we Question Number Solution Pima F gy) Okan back of Static method by static — method : im fined amount of memory 2 allocated! , @ a W) freee: free( eh); v" » Fink binady -search(ink ray ie OD: on ) oid main Link Link toss thy fers Kyat 8c abe) a MryP As st (ws igh) . eer NTs “fd" ¥M), Sack = [Jors lps ink (: camenti"}] phy IF (deg >= Ofrmid]) Aatiarr mA; Halves v0; 144) 2 (Hy
allocate) @ is abot , tA ta membas of to Hivckile yaad ntnbetd unity “) eee aie ©) snibeligahion Gn not ee Sean de trata da’) Selection Sok 1—- selection Sort pid maint usr) sateck -Sovt (int wy, ink LJ) on ay Unt 4, Pdr temps ™ nthe ne yn wens tt) pees ee) lo Sent ("/d", ¥n), P&=E, POE t (erfay Bhomenty ")” (ister EO feoreniet) |e Ls t(a(y] cafrs]) resed Stomp (“f3", vapry) select -Sort(n, a) emp = aD] PACE (" Sorts Elomenbs ate [Y alr]= fps]; 48 (i205 KMD) pind: re int 2, 3 J. m ) Conca Bb) Penatin of He Shing 9) ona eea(ci Si, chal SOL 3) void tengtn (chor sity) Liat id Litade taunt 28,620 j while (str[t]4 =e") Gy while. (sh (J, = Ge!) ety itty = ai faGeaseoBly We! ict) { mie OSpurte df= std i pint fang ta A" Count), * eag aching MAX TE PMS lo} MC) Findude
Void maint J ink abe], U4 leg, Hen ym, n)k-0,key, PE (* enber number f md"y ede f Struck *f ‘unt Mey e eA TERN; ) end | Lafolr=m,apheen; a7 48(i=05 i
_ Priate [> tay ey domint"); Stam (8 of 3", wey)» seach( ), Perey, 6mSubject Title = Subject Code : . peecion Solution ae umber Allocate 3a) stack £ LTfo dala stwebute, Tnaehion sdlelon yo peprmad from We dere oe 2nd Collet 40P End Gk fy Non-Primitive Linead lata shucloe . erdabne |ss H#Aefing SOS Go rahi ink 65), f0P.i, im, afte - Void push) Void maaC J af (isp = =Ss-1) apa om Ilroenie —gktgn : d Bly +top]= item, Qriatt[* ): push , Life 3dioply| init"), se $ Pritt (“enber here “)," fe Pept ) Seong (“73 ¥ cA), at (bp == -1) Switch (ch) ‘ox tF [stesck Exmpty),” tn, "1 coe 1: pal) byeay Thlidel ete dnd", aLp--]) — }. Care Li popl); Noid caplag( brea, x wk 1 Extra Lirplese dy break, falico; 1S PPLI+F) Xnte (Sdn OLED, Met Suitle), ) C247 j gt3b) Wan: (area) rere) (Dente: x by $2 eve) a. Pacfin , ABC-DE FEN Y — potthn: KYZFRM-N TPA r xe 343=6m 3 F inckide
SLror -J) fag Compute (Sym Lat top) 44) bel, of 1072); 33"Subject'Title : Subject Code : : ae Solution Ne hay Bars bacic of pater ute, errs } VY 1am se rp fo asl, guscation from 7408 Encl & Wok foisible , Eventhough “Hate do & SPace avaulable jak the front ind. us absadvantam Bon be OVE Gme wale UWule® Queut- prindudt
. Noth wuss — freakC | void dab-Tearl ) Not 4 inteak-YealC on (f>28 gi 2271) t aon se ak fq eter) cite? Tuk ftanene vod ona: Prntfaume 40h eee ‘ — aw (47°) port (det eters a fi0)-Jj gga items siters HPO i apayeites dance front (ection not fbbible'?,Subject Title : - FQuesti Subject Code : uestion: ~ TF 3 Number Solution tae iy wid dele Frentl 7 gator [Oy | (itty) ‘ . aS {print # (+ queue enfty cone 13 PUI (‘Ener idem Sebatas Skomt (fd wiser), pant e(oaat lets 17 aft 9), eet x Lém at(fov) feos pa tt (eee fa" Biden), Void mour | ml eee eet Lik ch, Heer #3, VE), ben ae ' fei reas Ted Coe b del Yor di $AGi) | pAholter defo Omitted; 3g Re poyd uk front, 25 OF Gitmt} Pet Oe ti aD gatiay puint# ("ebay nerce')’ stent (fd FAY ro) Quek uae Sigly doped at funcki ont Pare sat. frat Oy _ fie rm jase — area 2 A OY peeks (prt dl - prot ) display C2 ar olplagl J, WoDE insert -¥eor (i,t iter, ODE frst) Lone emp, Ch; ten = (mba Trialloc (ised (st vot neole)) oe temp 2 in for Sims dee temp > link = null; af (frst == vole) Aihara kere wr 2 firsts while (luk > link Jeonved) Lau 2 tuk plinky 3 ug > gue = on cy, Aebarn firgty 3No ~ Fro No Ss dE fron li DE rst) yo n oel t Arb Kyo ocke L mde semp, 3#( RAK =2NvtL) fone Sprint [© big . fat info; Bechara; opty struct node phic; sap rats tel truck nook 7 wodey emp Peep 2 abi es print [odel ebifel®, Arak heh) wid maid ) . tes (sra : nore frst = null, | 3 va Pups os chiles ale (1) wid dapleg (mene frat) q | Lene Poop print sires Hand chdeke front, | at (fit == wll) giclnplog , git”), § pratt (* Loot "),- pant ("enter choice Wy ners stomp (\ £3 YA) ahontp [reetints ote Steh(Ch) 2 fats / ws | pep ow) coe | pret (el ifern 4 punt (* fds gempriab) Stomt (“/4 y pik), Jemp2 emp slinky Fates inbett Yeas [item bras 3 / brary 3 lave 2: past = del Hoot (frst), brtak,” Core 3: Ansp lage), | brtat,’ ae Suit (0), ltl), 4 |5b» Void Seaath (jak = bratky y NODE line a Fer, node frst) TF (fyak ==nule) x PAE (Lat ay Son ot») Atbntn j Emp) Gug2 firshs rotile C tug | once) x SF (Hay == Gd info) break; lad = Gud Link; tt (Curz= null) {print # (“Seatdh eo unsaccers full") arbara/ Brat ¢ (*9tatch 4p paceespt"') 3 BE) woré dal inrfoliat Mem, Nope teed) —= Genet} dnere prev, cur, nent tree (au ),’ i¢( head Qrlinx ==head ) Bokuyn heodk,’ L print t (* Lt trmpty") Ya head j j ot ahead y¥links while (C4 } - least) {oF (item =A yinfo) brag, U8 = GA Blink, 3 af (et == heact ) Uprint t (item nok tard"), Actayn head ; priv= Ca JMlinky nent = Gk s1Vaksba » sab buat (ope frst) Lope cus tak count 0 ; at (Free nute) { . Priat$ ("rember ef. nods 0") a fa, 43> frst, veil Cus b= sult) Leount ++ 0 2 G8 Slink, ters lounk j § b ( See | Lore emp, G8, Yemp= Gtio node ¥) mnadloc, (six (std necke)), puget - fro nk (ink item, ope Mead ) pempainfo = 17 Kary syrlink j seUink = Jeg, b | 5 |line = head; — (tpxe-8o) emp -) glia = O44" | lak 3 |Link =Hmpy Refer heal,’ 5 ] head gilinks PIM/ ynere del veo (weve Wal) | rey oitak = head Pant OL hel Ele bo Ad” GR ink | 4 {Node cd, PIV, a (head 9 Unk =S haod ) proth («lob ”),' Aun evs 3 uz hand! > 10K reve ag 2 Iba ree (044), mOE) NDE Qty add (nopE a, wore b) 7 Tere c ewolly lak Coeff | while [> | wuld 6b} uve) —- Bald Leitch (doompare (42 Safin b> yen) wast 0 wet cat weHfe b> Off re (cock 422) czattach (wneth, a-repine ©): ack alary bobolnky bre coach (a3 toch 09 pS) az az lak preak, ere Stach (boeett , ©? expong), “ bob 2 lines hide (04? wie) {o- attach (on tectt ,2 9m" 12) Coke) * pon pile (b! swt) 1 attacs (220 bompen 1c); hob Duak, et Cs yn gale a en NODE drat) sink SPaf ( frst =o null) Babar mp; Gare fraty idle (Cat link b2 eo) g Cauk= GA heal a Gaie = Pm,” Pekinr ny Araty4a) / (i) Skate ee’ Sieryest We ve Commoting of oly left i Re ight pubs tie ot A @ 28, € Bight Stewed bre ett Stewed! Bez ‘ AT) (yecem ) pia J Yake=Pmp; i) wed youre (tab ikem nope Aoet) Tyrag e Hemp, C8 YOY seme = tive 0b) moods (S-edige (lroetnocte)) dnp ainto? jem, naa = NUH pnp ye unt = nuly 4 (ort 2 wull) LbatakemP, prey = null’ td = Foo t; tdide (lod yew) L 24) F Piven pur tao) ~ Qug > GA) Waly phase Uday wie ote) |3 ga) mepe tart (ih ira wepe rev) / —3~49 | {wove mp,ud , prev dar br fio); we et Yong 5 (stwet node-#) malloc (1 #5izeep (stro Prcele)), Emp >in for Wen} yemps Hine = Hemp 9 vale = Neb; H (wot cenvit) Atbara Sony Phat + (° Eby rection) Stomt (“J ", Airechen ): Prev =NVLL; Wud = ook; . 5 fy (peoj 1 tilen Lirechon) MFA) | \ot( cu == Nuct) brea; Youve ay ! v4 (aiacctio [1] == 'L aK =Ht >) (nk ' ORs = cut 3 Yuide; 3t(an } = ole I/F J = Stren Girechony) \painkt (treat aot parnble J” itd tak; tt (dissection Fi-1J + i) Greys [lae= fnp,’ sai - WWale= km,’ Rabin oot;| | 8b) Void. Preorder ( nod ook) Lat (toot == Nut) Retry {an3260 ) 6 [4 " Reel > info); Preordes (Foot >Iiak), PreorhA (root Yr link), void — patorche (mE Yo) Lat (‘soot seutl) &itstn ; alia porter (rot JIUak)),” Pestoveles, (oot 3 rUiake) ; / Pint (' fd root lah), oid {norde, (node ot ) en (vt c= null) akira / inorder (Yeot JIUak) ; Rit Oa" taht ain) Votes Croot > thee,” SE) euphin traded Varro Teg —~ Genes oe) The” hte optationy —Comeivs ) W fread) (6) £Sconf( J, (4) Frorite( > 4} fei : (2) fopent ) - Ye) tebsec y fai CS) foartedb ) sted node a Lia (fem, yoid maint.) * Strock node # Uns “ted srt nokt uo Sink afiey,n,° lak Depate (tat Hem, ink J) pe ("ender 0 F notes" sep) ¥n), Satan ( Cem [Cont eH (08d -D) ACD i lesaur(int af J, iat) FA(i2ei (<9) cre) a SF d", HOfiT) big cafes; Pradkix(a,n); fA (ie eSNG itt) priatt('sabb 4p et (a0'7 rbig) big7edT/ : Fylaen big/ Hh (veo SS nzier) } putt yd", a) wang radin (le aL3, et 0) gerne >, Link jj ym) 00 big AIO . : NODE p L1e], mrp - (6 ™) big Lesgest Carn), melog.o( bi D t/ $8 (J215 1g mid Upa(ssoi e8ai O44! jJesueG rend et) Lagit = seeoe8 (f5,j), (apt smatrzacid, plagity, pros £8 [5207 vorrrr) {4emp =P Uj ) tatile emp), onl So tod zemeonts emp sep UFteas SE MSI2s bt, 78196, 81, 3, a : uifs2 # ex) [él ape - §m. eet 98 S 4] 4 24,27, td 52, 63,64 FER 96 Ae) void jnertion Sort (jak wink O05) Liat 15, pm; 48 (i295 igm-ls it4) Vitem=ap Jy — 6m f-) sfilapyinns eagyJeed7%e) fafyrd= ofits Ja Log) Wold bésCick Ud printt (“a”) ¥), Link fel, $20, 2° Waike Sues Pint E( pocket jeachable from fd") Ulery: _ bm Visited Fuge bs v Vit tr = 4 void mainc ) Wk (FS ¥) L cane yead i] P, basa beer) best), fA(w2L Veni vtt os 19 (aqujivd==! ag, vis KS LY] == ) 3 1@b) aya og croton adh atenty Lit Grs-6m) 6 - # = 8 ‘i fi | aoc BN D cf] He 4s +- GN D! Helps \@D Ahaition ¢ Hashiog —— (6motEs) Hash Haminology o "hash fale, Liu feetino. pant Fy hagh Gollemen OPM ackdsoyys cpt ball halla J a 1) 1 t to \
You might also like
DSA 2022 Paper
PDF
No ratings yet
DSA 2022 Paper
41 pages
SCH 18CS32
PDF
No ratings yet
SCH 18CS32
11 pages
CP Important Question Bank Which Can Come
PDF
No ratings yet
CP Important Question Bank Which Can Come
32 pages
OOP Solved Manual - Watermark
PDF
No ratings yet
OOP Solved Manual - Watermark
104 pages
MCA (1st Sem End Term) 2022
PDF
No ratings yet
MCA (1st Sem End Term) 2022
13 pages
BCV654B Geographic Information Systems
PDF
No ratings yet
BCV654B Geographic Information Systems
2 pages
Sample Programming Questions - SET 3
PDF
No ratings yet
Sample Programming Questions - SET 3
15 pages
301 Past Questions
PDF
No ratings yet
301 Past Questions
24 pages
C Programing Imp Questions
PDF
No ratings yet
C Programing Imp Questions
8 pages
BCV654C Integrated Waste Management For A Smart City
PDF
No ratings yet
BCV654C Integrated Waste Management For A Smart City
2 pages
AD 1 Assignment
PDF
No ratings yet
AD 1 Assignment
32 pages
Last Year Question Papers of All Subjects
PDF
No ratings yet
Last Year Question Papers of All Subjects
16 pages
Zoho Interview Questions
PDF
50% (2)
Zoho Interview Questions
23 pages
Zoho Placement Material by PLACEMENTLELO
PDF
No ratings yet
Zoho Placement Material by PLACEMENTLELO
16 pages
C Programming
PDF
No ratings yet
C Programming
26 pages
Adobe Scan 16 Sep 2023
PDF
No ratings yet
Adobe Scan 16 Sep 2023
30 pages
Engg1110b 2023-2024
PDF
No ratings yet
Engg1110b 2023-2024
17 pages
Pattern Printing Assignment
PDF
No ratings yet
Pattern Printing Assignment
14 pages
C++ Unit 2
PDF
No ratings yet
C++ Unit 2
46 pages
CTSD Week-9
PDF
No ratings yet
CTSD Week-9
31 pages
CN Observation Notes
PDF
No ratings yet
CN Observation Notes
33 pages
SCH Bcs304
PDF
No ratings yet
SCH Bcs304
25 pages
BScMathSc ProblemSolvingUsingComputers So 241028 164636
PDF
No ratings yet
BScMathSc ProblemSolvingUsingComputers So 241028 164636
7 pages
IT1 2017 Structured Programming
PDF
No ratings yet
IT1 2017 Structured Programming
4 pages
2nd Sem Ass.2018-19 PDF
PDF
No ratings yet
2nd Sem Ass.2018-19 PDF
17 pages
CS Winter Break Solution
PDF
No ratings yet
CS Winter Break Solution
19 pages
Data Structures Using C and C++ - Y. Langsam, M. Augenstein and A. M. Tenenbaum
PDF
No ratings yet
Data Structures Using C and C++ - Y. Langsam, M. Augenstein and A. M. Tenenbaum
99 pages
Computer Science Practical Amit Bikram Mishra Class Xii Science A
PDF
No ratings yet
Computer Science Practical Amit Bikram Mishra Class Xii Science A
18 pages
KNIT Sultanpur 3rd Semester Question Paper
PDF
No ratings yet
KNIT Sultanpur 3rd Semester Question Paper
25 pages
CSCB
PDF
No ratings yet
CSCB
6 pages
Second Semester Past Questions
PDF
No ratings yet
Second Semester Past Questions
10 pages
CAPE Computer Science P2
PDF
No ratings yet
CAPE Computer Science P2
7 pages
Sem 3 Comp CBCGS Old May 2017
PDF
No ratings yet
Sem 3 Comp CBCGS Old May 2017
14 pages
SSC-II - Computer SC - 2nd Annual 2024
PDF
No ratings yet
SSC-II - Computer SC - 2nd Annual 2024
3 pages
An Old Mid Term PF Paper
PDF
No ratings yet
An Old Mid Term PF Paper
12 pages
Supermind 4 Unit 9 Exercise
PDF
No ratings yet
Supermind 4 Unit 9 Exercise
8 pages
10th Computer FLPs
PDF
No ratings yet
10th Computer FLPs
10 pages
QP 2023
PDF
No ratings yet
QP 2023
14 pages
12th Computer
PDF
No ratings yet
12th Computer
3 pages
1
PDF
No ratings yet
1
2 pages
C
PDF
No ratings yet
C
25 pages
CompSci U1 P2 2019
PDF
No ratings yet
CompSci U1 P2 2019
26 pages
End Online
PDF
No ratings yet
End Online
3 pages
SCH - 18cs32 Feb 2021
PDF
No ratings yet
SCH - 18cs32 Feb 2021
13 pages
CACSC02
PDF
No ratings yet
CACSC02
4 pages
May 2023 PIC
PDF
No ratings yet
May 2023 PIC
2 pages
Dsa Cheatsheet: Code Library
PDF
No ratings yet
Dsa Cheatsheet: Code Library
4 pages
Sample Paper 7
PDF
No ratings yet
Sample Paper 7
7 pages
CSE100
PDF
No ratings yet
CSE100
4 pages
I Semester
PDF
No ratings yet
I Semester
19 pages
Homework 1
PDF
No ratings yet
Homework 1
6 pages
Questions List
PDF
No ratings yet
Questions List
17 pages
X:50 (C) Intx 6 5/3+81 Inty X/2 (D)
PDF
No ratings yet
X:50 (C) Intx 6 5/3+81 Inty X/2 (D)
1 page
Computer Science Cape 2010
PDF
No ratings yet
Computer Science Cape 2010
7 pages
r19 C Syllabus
PDF
No ratings yet
r19 C Syllabus
2 pages
Elect 2012
PDF
No ratings yet
Elect 2012
123 pages
Social Connect & Responsibility-Finel
PDF
100% (1)
Social Connect & Responsibility-Finel
3 pages
Example Problems
PDF
No ratings yet
Example Problems
4 pages
SCH 18CS42
PDF
No ratings yet
SCH 18CS42
8 pages
Google Groups Creation
PDF
No ratings yet
Google Groups Creation
6 pages
14scs22 Acn Question Paper
PDF
No ratings yet
14scs22 Acn Question Paper
2 pages
Assignment 10: Unit 12 - Week 10
PDF
No ratings yet
Assignment 10: Unit 12 - Week 10
6 pages
2 Merge Sort
PDF
No ratings yet
2 Merge Sort
3 pages