

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
I uploaded assignments for many different subjects related my degree Computer Science. This assignment for Data Structures includes: Data, Structure, Operation, Array, Coloumn, Row, Address, Stack, Queue, List, Link, Delete, Memory, Algorithm
Typology: Exercises
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Course: Data Structures (3408) Semester: Spring, 2012 Level: BS (CS) Total Marks: 100 Pass Marks: 50
(Units: 1–4)
Note: All questions are compulsory. All questions carry equal marks.
Q. 1 (a) Define data structure. Name and explain different types of data structure. Explain operations that can be performed on these data structures. (b) What is an algorithm? What is time and space analysis of an algorithm? Elaborate the concept of the best, average & worst cases analysis.
Q. 2 (a) What are the principle differences between arrays and structures? How address calculations are performed for the access of an item for each? (b) A dynamically declared array A is defined with row and column subscripts varying from 1 to 5. Give the storage mapping function to map A into memory assuming column-major and row-major storage order.
Q. 3 (a) Define and explain stack. Give representation of a stack in memory. (b) Write an algorithm and a program for the insertion (push) and deletion (pop) of an element from a stack.
Q. 4 (a) What are infix, postfix and prefix notations? Write an algorithm for the conversion of infix expression to polish or reverse polish expression. (b) Give a trace for the translation of given infix string to polish and reverse polish string. A / B – C * D + A
Q. 5 (a) Define and explain queue and de-queue. Give memory representation of each. (b) Formulate an algorithm and a program for the insertion and deletion of an element from a queue.
(Units: 5–8) Total Marks: 100 Pass Marks: 50
Note: All questions carry equal marks.
Q. 1 (a) What is linked list? What are its types? Give representation of a linked list in memory. (b) Formulate an algorithm to insert an element at the start of the linked list and to delete an element from the middle of the linked list.
Q. 2 (a) Define arid explain tree and its types. Give linked representation of a binary tree in memory. (b) Formulate an algorithm and a program for the pre-order, post-order and in- order traversal of binary tree. Illustrate with the help of diagrams.
Q. 3 (a) Give time complexities of Bubble sort, Insertion sort, Selection sort, Quick sort, Merge sort, Radix sort, Binary search, and Sequential search in tabular form. (b) Give trace of Bubble sort, Insertion sort, and Selection sort using one suitable example for each.
Q. 4 (a) Give trace of Binary search and Sequential search using examples. (b) What is a graph and what are its types? Give matrix and adjacency list representation of an example graph in memory?
Q. 5 Explain each step with graph example for the trace of Breadth first search and Depth first search graph traversal algorithms.