Firstranker's choice
Code: 17F00201
--- Content provided by FirstRanker.com ---
MCA II Semester Regular & Supplementary Examinations May/June 2019
DATA STRUCTURES
(For students admitted in 2017 & 2018 only)
Time: 3 hours Max. Marks: 60
--- Content provided by FirstRanker.com ---
Answer all the questions
- (a) Justify the statement ‘Pointers can be Dangerous’ with an illustration.
- (b) A ‘C’ function for printing out a matrix is as follows:
Determine worst-case complexity for the above ‘C’ function.
Void print_matrix(int matrix [ ] [MAX_SIZE], int rows, int cols)
{ int i, j; for (i = 0; i < rows; i++) for(j = 0; j < cols; j++) { printf(“%d”, matrix[i] [j]); printf(“\n”); }--- Content provided by FirstRanker.com ---
}
OR
- Given ‘n’, a positive integer, determine if ‘n’ is the sum of its divisors, i.e if ‘n’ is the sum of all ‘t’ such that 1<t <n and ‘t’ divides ‘n’.
- Explain ‘clocking’ in performance measurement with functions supported in ‘C’.
- Explain Dynamically allocated one dimensional array with an example.
- Write a ‘C’ program for demonstrating the various stack operations, including cases of overflow and underflow of stacks.
--- Content provided by FirstRanker.com ---
OR
- Define stack. Implement ‘Push’ and ‘Pop”functions for stack using arrays.
- Explain with a suitable example, how circular queue is implemented using dynamically allocated arrays.
- Give the node structure to create a singly linked list of integers and write functions to perform the following:
- Create a list
- Assume the list contains 3 nodes with data 10, 20, 30. Insert a node with data 40 at the end of the list.
- Insert a node with data 50 between the nodes having data values 10 and 20.
- Display the singly linked list.
--- Content provided by FirstRanker.com ---
- Write the node structure for linked list representation of a polynomial.
--- Content provided by FirstRanker.com ---
OR
- List out the difference between the Doubly linked list and singly linked list.
- Illustrate with example the following operations on a Doubly linked list.
- Inserting a node at the beginning.
- Inserting at the intermediate position.
- Deletion of a node with a given value.
--- Content provided by FirstRanker.com ---
- Explain ‘Spare matrix representation’ with an example.
Page 1 of 2
--- Content provided by FirstRanker.com ---
Firstranker's choice
Code: 17F00201
- Define binary trees. Explain the following with examples:
- Complete binary tree.
- Skewed binary tree.
- Almost complete binary tree.
- Height of a binary tree.
--- Content provided by FirstRanker.com ---
- Explain ‘Spanning tree’ with an example.
OR
--- Content provided by FirstRanker.com ---
- What is the advantage of threaded binary tree over binary tree? Explain the construction of threaded binary tree for 10, 20, 30, 40 and 50.
- Define graph. Outline the difference between graphs and trees with examples.
- What is a heap? Write an algorithm to implement heap sort.
- Write a ‘C’ program to accept an array of ‘n’ integer elements and searches for the desired element using binary search.
OR
--- Content provided by FirstRanker.com ---
- Write an algorithm for quick sort. Trace the algorithm for the data: 45, 26, 77, 14, 68, 61, 97, 39.
- Explain Fibonacci search with an example.
--- Content provided by FirstRanker.com ---
This download link is referred from the post: JNTUA MCA 2nd Sem last 10 year 2010-2020 Previous Question Papers (JNTU Anantapur)