0% found this document useful (0 votes)
13 views2 pages

DSJJ2018

Uploaded by

saanasha02
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)
13 views2 pages

DSJJ2018

Uploaded by

saanasha02
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/ 2

RAMAIAH

MCA24
Institute of Technology
USN 1 M S

(Autonomous Institute, Affiliated to VTU)


(Approved by AICTE, New Delhi & Govt. of Karnataka) Accredited by NBA & NAAC with ‘A’ Grade

MAKEUP EXAMINATIONS – JUNE/JULY 2018


Course & Branch : Master of Computer Applications Semester : II
Subject : Data Structures using C Max. Marks : 100
Subject Code : MCA24 Duration : 3 Hrs

Instructions to the Candidates:


● Answer one full question from each unit.

UNIT- I
1. a) Differentiate between data type and data structures with suitable CO1 (06)
examples.
b) Convert the following infix expression to postfix expression: CO2 (04)
((A+B)-C)*D
(A-(B+C))*D)$(E+F)
c) Write a C program to implement stack data structure to perform PUSH CO2 (10)
(insert operation), POP (Delete operation) and Display stack.

2. a) Write a C recursive program to solve the Tower of Hanoi Problem. CO3 (06)
b) Define recursion. Mention any 4 differences between recursion and CO3 (06)
iterative method.
c) Write an algorithm for evaluating the postfix expression. CO2 (08)

UNIT – II
3. a) Develop a ‘C’ program to implement the single linked list to perform CO1 (10)
the following operations.
• create()
• insert()
• delete ()
• display()
b) Explain how doubly linked lists are beneficial than single linked lists. CO1 (10)
Also develop a ‘C’ routine to insert a node before a given key node in a
doubly linked list.

4. a) Develop a ‘C’ program to implement the Queue to perform the following CO1 (10)
operations.
• create()
• insert()
• delete ()
• display()
b) Write routines to perform each of the following operation on a linear CO2 (10)
list:
i. Delete every second element for a list
ii. Return the number of elements in the list.

UNIT-III

Page 1 of 2
5. a)
MCA24
Represent the following expressions using binary tree and also write CO4 (10)
the preorder and postorder traversals for the tree generated.
i. A+(B-C)*D$(E*F) ii. (A+B*C)$ ((D+E)*F)
b) Write an algorithm to delete a node from the BST. Also explain the CO4 (10)
same using appropriate example.

6. a) Define and give an example for Threaded Binary tree. CO4 (04)
b) Construct the Binary search tree for the following elements: CO4 (10)
D A T A S T R U C T U R E S U S I N G C
Also find the inorder traversal of the BST generated.
c) Define Binary Tree, Complete Tree and nearly complete Tree. Give one CO4 (06)
example for each.

UNIT- IV
7. a) What is an AVL tree? Write an algorithm to delete the AVL tree. CO4 (10)
Construct all AVL trees for 4 nodes.
b) Show construction of a heap from the following data 30, 4, 12, 9, 19, CO4 (10)
50, 65, 60, 20, 17. Insert 75 into the Heap and reheapify.

8. a) Define Heap. Write Heap sort Algorithm. CO4 (10)


b) Create an AVL tree using the following data. Show the balance factors CO4 (10)
in the resulting tree. 23, 44, 18, 52, 20, 12, 4, 14, 16. Insert 44 and
50 into the tree created.

UNIT- V
9. a) Draw a B-tree of order 5 for the following set of elements arriving in CO5 (12)
the sequence:
76, 21, 14, 11,97, 85, 74, 63, 45, 42, 57, 20, 16, 19, 52, 30, 21
b) Discuss Breadth-first traversal of a graph with suitable example. CO5 (08)

10. a) Differentiate the following graph storage structures using suitable CO5 (10)
example.
i) Adjacency Matrix
ii) Adjacency List.
b) Draw complete 2-3 and 2-3-4 trees. CO5 (04)
c) Define the following With reference to Graph and give one example CO5 (06)
each Path, Cycle, Loop, Degree, Out-Degree and In-Degree.

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

Page 2 of 2

You might also like