0% found this document useful (0 votes)
0 views

DS model QP and key

The document outlines a model question paper for a Data Structures course, detailing various course outcomes and exam questions. It includes topics such as Quick Sort vs. Merge Sort, algorithms for data structures, and memory allocation methods. The paper is structured into parts with questions of varying marks and a teaching plan for the course modules.

Uploaded by

shaibyeldho001
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)
0 views

DS model QP and key

The document outlines a model question paper for a Data Structures course, detailing various course outcomes and exam questions. It includes topics such as Quick Sort vs. Merge Sort, algorithms for data structures, and memory allocation methods. The paper is structured into parts with questions of varying marks and a teaching plan for the course modules.

Uploaded by

shaibyeldho001
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/ 38

Course Outcome 5(CO5): In what circumstances does Quick Sort perform over Merge

sort

Course Outcome 6(CO6): Design a reservation system for railways that include

waiting list. If the reservation is ful "Display reservation full" and put the passenger in

in waiting list and give a waiting list number. If a passenger cancels the ticket. then the

seat should be automatically allocated to the first passenger in the waitiny list.

Model Question Paper

QP CODE: PAGES:3

Reg No:
Name:
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY THIRD SEMESTER B.TECH
DEGREE EXAMINATION, MONTH &YEAR

Course Code: CST 201

Course Name: DATA STRUCTURES

Max.Marks:100 Duration: 3 Hours

PART A

Answer all Questions. Each question carries 3 Marks

. Calculate the frequency couni of the statcmcnt x = ^Ti; in the following code scgment

for (i = 0: I< n: i )

for j-0:j< n: j*=2)

What is the relevance of verification in System Life Cycle?

3 Write an algorithm to insert a new element in a particular position of an array


4 Convert the expression ((A(B-D+ E)*(F-G) *H) to postfix form. Show cach step in the
conversion including the stack contents

Write algorithm to count the number


an of occurrences of a character in a linked list (each
node contains only one character)

6. Write an algorithm for best-fit method of memory allocation

7. Draw the binary tree whose sequential representation is given below

2 4 5 6 7 89 10 11 1 2 13 14 15
A B C D E F G

8. Find the First Search


Depth of the following Graph
A

B D

E F G

9. Write an
algorithm to numbers in
arrange n
order. nonincreas1ng
0. Let the size of a hash table
is 10. The index of the hash
the keys 73, 54. 15, table varies from 0 to 9.
48, 89, 6, 37, 18, 41, 22, 62 are Assume
Show how the keys are
mapped
distributed using chaining method. using modulo operator.
Part B

Answer any one Question from each module. Fach question carries 14 Marks

11 a) Explain the System Life Cycle in detail


(10)
b) How the performance of an algornthm is evaluated? (4)

OR

12 a) Write algorithms for Lincar Search and Binary Scarch and Compare their time

complexities (10)
b) Between O(nlogn) and Ologn) which one is better and why? 4)

13 a) Wnte algorithms to insert and delete elements from a double ended queue

Demonstrate with examples (10)


b) Compare and contrast Circular Queue with Normal Qucue
a
(4)
OR

14 a) Wrnte an algornthm to insert and delete elements from a Prnonity Queue 8)


b) Discuss an algorithm to convert an infix eapression to a prefir expression (6)

15 a) Write an algor1thm to mult1pl, two poly nomials represented using l1nked list
10)
b)How doubly l1nked ist can be uscd to find palindromes 4
OR

I6 a) How is
memory compaction ( de-allocation) done in
memory management
b) Discuss the advantages and d1sadv antages ot First-fit. Best-fit and Worst-fit allocataon

schemcs
17. a) List the properties of Binary Search Trec. Write an algorithm to search an element

from a Binary Search Tree (10)

b) Write an iterative algorithm for in-order traversal of a Binary Tree (4)

OR

18. a) Give algorithms for DFS and BFS of a graph and explain with examples (8)

b) How graphs can be represented in a Computer? (6)

19. a) Write algorithms for Merge sort and Quick Sort. (10)

b) Illustrate the working of Quick sort on the following input 38, 8, 0, 28, 45, -12, 89, 66,
42 4)

OR

20. a) With examples discuss the different hash functions used for hashing (10)

linear probing the data 2341, 4234,


b) Apply the hash function h(x) x mod 7 for
= on

hash table (4)


2839, 430, 22, 397, 3920 and show the resulting

Teaching Plan

Module 1 :Basic Concepts of Data Structures (5 hours)

T hour
1. System Life Cycle,
I hour
1.2 Algorithms, Performance Analysis
hour
1.3 Space Complexity. Time Complexity
I hour
1.4 Asymptotic Notation (Big O Notation)
Ihour
I.5 Complexity Calculation of Simple Algorithms
Module 2 :Arrays and Searching (10 hours)

1 hour
2.1 Polynomial representation using Arays
l hour
2.2 Sparse matrix (Lecture 1)
hour
2.3 Sparse matrix (Lecture 2)

You might also like