0% found this document useful (0 votes)
31 views4 pages

Ce 317

This document contains a past exam paper for the subject "Data Structures" from RK University. The exam consists of 6 questions testing knowledge of data structures like stacks, queues, linked lists, trees, graphs, and sorting algorithms. Students are required to answer conceptual questions, write algorithms, and solve problems related to representing and manipulating various data structures. The exam is worth a total of 100 marks and must be completed within 3 hours.

Uploaded by

all work
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)
31 views4 pages

Ce 317

This document contains a past exam paper for the subject "Data Structures" from RK University. The exam consists of 6 questions testing knowledge of data structures like stacks, queues, linked lists, trees, graphs, and sorting algorithms. Students are required to answer conceptual questions, write algorithms, and solve problems related to representing and manipulating various data structures. The exam is worth a total of 100 marks and must be completed within 3 hours.

Uploaded by

all work
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/ 4

Date:21/12/2018 Enrolment No.

:___________________

RK UNIVERSITY
B.TECH./SEM-III/SUPPLEMENTARY/DEC.-2018

CE317: DATA STRUCTURES

Time: 09:00 AM TO 12:00 PM Total Marks: 100

Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Programmable calculator is not permissible.

SECTION – I
Q.1 (a) Select the most appropriate option: (Each of one mark) 06
1. Which of the following data structure is not linear?
a. Stack
b. Array
c. Queue
d. Tree
2. What are the advantages of arrays?
a. Easier to store elements of same data type
b. Used to implement other data structures like stack and queue
c. Both (a) and (b)
d. None of these
3. Which of the following applications may use a stack?
a. Checking balanced parenthesis
b. Evaluation of postfix expression
c. Reverse operation
d. All of these
4. The following sequence of operation is performed on stack.
push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), pop.
The sequence of popped out values are?
a. 2,2,1,1,2
b. 2,2,1,2,2
c. 2,1,2,2,1
d. 2,1,2,2,2
5. In linked list each node contains minimum two fields. One field is
data field to store the data second field is?
a. Pointer to character
b. Pointer to integer
c. Pointer to node
d. None of these
Page 1 of 4
6. Queue is ______ data structure.
a. Last in first out
b. First in first out
c. Both (a) and (b)
d. None of these

(b) Answer following questions: (Each of two mark) 10


1. Define Data structure with example.
2. Draw classification of Data Structures.
3. Write infix to post fix expression: P+Q*R+S/T
4. Write a User defined function to find sum of elements of an array.
5. How linked list is more efficient than array? Discuss it.

Q.2 (a) Convert given infix expressions to the postfix expressions with stack 06
trace: (A+B)*D+E/(F+G*D)+C
(b) Write a recursive algorithm to find factorial. 05
(c) Demonstrate use of stack in reverse operation with example. 05
OR
Q.2 (a) Write an algorithm to implement insert operation into a Circular 06
Queue using array representation of Queue.
(b) Create a C function to display total number of nodes in a singly 05
linked list.
(c) Write an algorithm for inserting a node and deleting a node in 05
doubly linked list.

Q.3 (a) Define “Stack”. Also write algorithm / UDF for PUSH and POP 06
operations.
(b) Write an algorithm to delete an element from singly linked list. 06
(c) What is node? How to represent node in C programming language? 06
Also write code to insert new node at beginning of the linked list.
OR
Q.3 (a) Define “Queue”. Also write algorithm / UDF for INSERT and 06
DELETE operations.
(b) Write an algorithm to insert an element at the middle position in a 06
circular linked list.
(c) Write algorithm / program to insert new node at the end of linked 06
list.

Page 2 of 4
SECTION – II

Q.4 (a) Select the most appropriate option: (Each of one mark) 06
1. Binary trees can have how many children?
a. 2
b. 0 or 1 or 2
c. 0 or 1
d. 1
2. Which of the following is true about a binary search tree?
a. The left child is always lesser than its parent
b. The right child is always greater than its parent
c. Both (a) and (b)
d. None of these
3. Height of complete binary tree is
a. H = O(log n)
b. H = O(n)
c. H = O(n*H)
d. H = O(n log n)
4. The number of elements in the adjacency matrix of a graph having 5
vertices is
a. 16
b. 36
c. 49
d. 25
5. Which of the following terminology is not related to tree?
a. Root node
b. Leaf node
c. Parent node
d. Public node
6. Which of the following searching algorithm is better?
a. Linear search
b. Binary search
c. Both (a) and (b)
d. None of these

(b) Answer following questions: (Each of two mark) 10


1. Define graph. List out areas in which it uses widely.
2. Define the following terms of tree:
1) Siblings
2) Leaf node.
3. Give examples of complete binary tree.
4. Draw 4 level heighted tree.
5. Define Predecessor of node.

Page 3 of 4
Q.5 (a) Draw BST for given sequence 50, 40, 60,30,55,70,65,82,92. After 06
creation of BST insert new node 95 in tree and delete 82 from list.
(b) Write an algorithm / implementation of binary search. 05
(c) Explain matrix and Adjacency list representation of a graph with 05
suitable example.
OR
Q.5 (a) Construct BST on given traversal technique. 06
Preorder: G,B,Q,A,C,K,F,P,D,E,R,H
Inorder: Q,B,K,C,F,A,G,P,E,D,H,R
(b) Explain selection sort with suitable example. 05
(c) Write an algorithm of Linear Search. 05

Q.6 (a) Write a C program to implement shell sort algorithm. 06


(b) Show steps to sort given numbers using insertion sort. 06
60, 5, 43, 30, 15, 100, 97, 87,10.
(c) Explain radix sort with an example. 06
OR
Q.6 (a) Explain following terms with respect to graph: 06
1) Cycle
2) Directed graph
3) Undirected graph
(b) Write a C program to implement bubble sort algorithm. 06
(c) Find Inorder, Preorder and Postorder of given Binary Tree. 06

*************

Page 4 of 4

You might also like