0% found this document useful (0 votes)
33 views3 pages

18CS32 April 2021

The document contains a summary of the G3CS scheme for the third semester B.E. degree examination in Data Structures and Applications. It includes 10 questions across 5 modules. The questions cover topics like data structures and their types, dynamic memory allocation functions, recursion, stacks, queues, linked lists, binary trees, binary search trees, graphs, sorting, hashing, and file operations. Students must answer 5 full questions by choosing 1 question from each module. The questions involve definitions, algorithms, implementations in C, representations of data structures, and evaluations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views3 pages

18CS32 April 2021

The document contains a summary of the G3CS scheme for the third semester B.E. degree examination in Data Structures and Applications. It includes 10 questions across 5 modules. The questions cover topics like data structures and their types, dynamic memory allocation functions, recursion, stacks, queues, linked lists, binary trees, binary search trees, graphs, sorting, hashing, and file operations. Students must answer 5 full questions by choosing 1 question from each module. The questions involve definitions, algorithms, implementations in C, representations of data structures, and evaluations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

G3CS SCHEME

18CS32
USN 4S 9 es o61
Third Semester B.E. Degree Examination, Jan./Feb. 2021
Data Structures and Applications
Time: 3 hrs. Max. Marks: 100

Note: Amswer any FIVE full questions, choosing ONE full question from each module.

Module-1
1 a. Define data structures. Explain with neat block chematic different types of data structures
with examples. What are the primitive operations that can be performed? (10 Marks)
b. Define sparse matrix. Express the following matrix in triplet form and find its transpose.
(10 Marks)
15 0 0 22
0 1 30
A =|
0
00-6|
0 0-0 0
91 00 0
0 28 0

OR
2 a. Explain any four dynamic memory allocation funetions with syntax and example. (10 Marks)
b. What do you mean by pattem matching? Outline the KMP algorithm. Implement the same to
find out the occurrence of following pattern.
P:ABCDABD
S:ABC ABCDAB ABCDABCDABDE (10 Marks)

Module-2
3 a. De fine Recursion. Let A and B be nonnegative integers. Suppose a function GCD is
recursively defined on follows:
GCD(A, B) = GCD (B. A) if A < B

A ifB =0
GCD(B, MOD(A, B)) otherwise
=

Here MOD(A, B) read as A Modulo B. Evaluate GCD(20, 28). (04 Marks)


b. Write C function for push(
), pop() and display) routine ofSTACK. (08 Marks)
C. Outline the algorithm for infix to postfix. Using the same algorithm convert following
INFIX expression to equivalent POSTFIX.
(H (((A +(B + C) *D)) * F) * G)* E) + J) (08 Marks)

OR
4 a. Write a C function CQlnsert( ) and CQDelete0 operations on
circular queue. (08 Marks)
b. Outline the algorithm for inlix to prefix. Using the same algorithm convert following INEIX
to equivalent PREFLX
(H (C(A +((BC) D)» F)* G)* E) +J) (08 Marks)
.Evaluate the following postfix expression by showing the contents ofthe stack
546+*493/+* (04 Marks)
I of 3
5 a.

i) Insertion at the beginning


Module-3
08:00pm
Write C functions for the following operations on linkeddisl
18CS32

Insertion at the end


ii)
ii) Deletion at the beginning
iv) Deletion at the end. (12 Marks)
b. Explain concept of sparse matrix representation using linked list. Represent the following
sparse matrix in linked list
format. SU 08 Marks)
o 0 3 0 4
- 2 0 2 1
0

- S U
- S

0 0 5 7 0
A =
0 00 0 0
0 2 6 0 0

OR
6 a. Write C function to addtwo polynomials. Show the linked list representation of below two
polynomials and in additton.
POLY 1:5x+ 4x
POLY 2:3x + 5 (08 Marks)
b. Write C functions for following operations.on circular linked list:
i) Insetion at the beginning
ii) Inserion at the end
i) Deletion at the beginning
iv) Deletion at the end.
SU 8pl
8pm (12 Marks)

1 a.
Module-4
Define Binary tree wittanekample. Write Crecprsive routine toraverse the given tree
using inorder, preorder and postorder. (08 Marks)
b. Define binary searçh tree. Draw the BST t h efollowing inpu
14 15 4 9 7 1835 16 20 17 9
Give recursive search function to searchan element in that tree/ (06 Marks)
c. Given the following traversal, draw'abináry tree:
i) Inorder:42516738 -S U
Postórder:4 526783 1
ii) Préorder: A BCE IFJD GHKL
Inorder EICFJBGDK HLA (06 Marks)

OR
8 aRepresent the below givén tree in Fig.Q.8a), using
i) Linked list representation
ii) Left childright sibling repre[cniation. (08 Marks

SU
S U
- S

SU-

Fig.Q.8(a)
S U

2 of 3

SU
pm
I8CS32

202g01: SU
b. Detine threaded binary tree. List its advantages
anddishdvantages. Draw the one way
threading and two way threading ofthe following binarytee. (Refer Fig.).8(b). (0% Marks)

01:0
02

C. Write function to insertan


Fig Q.8(b) A)
elément in a binary search tree. (04 Marks)

De fine the
Module-5
9 a. following teminologies with examples:
i) Digraph )Weighted graph ii) Selfloop iv) Parallel edges (08 Marks)
6. Give the adiacèncy matrix, incidence matrix and linked list representation of the following
undirected graph. (06 Marks)

S U

ey
FigO9b)
Arrange the folowing elements in ascending order using RADIX SORT
151,60, 875, 34212,477, 689, 128 (06 Marks)

7-04-2
07-04-2
OR
10 a. Explain different types of HASHfúnction with example. (10 Marks)
b. Explainany five file operations álong with syntaxand example. (10 Marks)

**
SU

U -SU
SU
-SU-

SU
3 of3

You might also like