1. 1
DEPARTMENT OF INFORMATION TECHNOLOGY
Subject Code : CS8451 Subject Name : Design & Analysis ofAlgorithms
Class/ Sem : II IT / II Sem Subject In – Charge : Dr. P. Subathra, Prof./IT
QUESTION BANK
UNIT II
BRUTE FORCE AND DIVIDE-AND-CONQUER
Brute Force – Computing an – String Matching - Closest-Pair and Convex-Hull Problems -
Exhaustive Search - Travelling Salesman Problem - Knapsack Problem - Assignment
problem. Divide and Conquer Methodology – Binary Search – Merge sort – Quick sort –
Heap Sort - Multiplication of Large Integers – Closest-Pair and Convex - Hull Problems.
Q. No Question
Marks
Knowled
geLevel
Number
of
Times
inAU
PART - A
INTRODUCTION
1. Define a linear and non-linear data structure. Give an example for each. 2 K1 1
2. List the four major operations in linear data structures 2 K1 1
ABSTRACT DATA TYPES (ADTS)
3. What is an ADT? Give an example. (OR) Define an abstract type. List out few.
(OR) What are abstract data types?
2 K1 10
4. What is the purpose of using ADTs in programs? (OR) What is advantage of an
ADT?
2 K1 2
5. What are all not concerned in an ADT? 2 K1 1
6. What is Data Structures? How is it classified? 2 K1 1
List ADT - ARRAY IMPLEMENTATION
7. Is linked list better than an arrayed list? Give at least two reasons for your answer. 2 K2 3
8. What are the advantages of linked lists over arrays? (OR) What are the advantages
and disadvantages of linked lists over arrays?
2 K1 3
9. What is the Data Structure used to perform recursion? 2 K1 1
10. Define List Abstract Data Type with example. 2 K1 1
2. 2
11. Provide the asymptotic complexity for calculating the Sum of n number in an
array.
2 K1 1
12. Explain why binary search cannot be performed on a linked list. 2 K2 1
LIST ADT - LINKED IMPLEMENTATION
13. Write algorithms to insert and delete an element from a linked list. 2 K1 1
LIST ADT - ARRAY & LINKED IMPLEMENTATION
14. Clearly distinguish between linked lists and arrays. Mention their relative
advantages and disadvantages.
2 K2 1
LINKED LIST CIRCULAR LINKEDLIST
15. What is circular linked list? 2 K1 1
PART B
ABSTRACT DATA TYPES (ADTS)
16. Write and explain the ADT operations for array implementation of a Queue. 8 K2 1
17. Write an ADT for Enqueue and Dequeue. (6) 6 K2 1
LIST ADT - LINKED IMPLEMENTATION
18. Develop a C program to split the linked list into two sub lists containing odd and
even ordered elements in them respectively.
16 K2 1
19. Write a C code for singly linked list with insert, delete, display operations using
structure pointer.
16 K2 1
20. What is a singly linked list? Write a C program that uses functions to perform the
following operations on singly list with suitable diagrammatic representations.
Consider all cases: Insertion b. Deletion c. Traversal
16 K2 1
21. Illustrate the algorithms to create the singly linked list and perform all the
operations on the created list.
16 K2 1
22. Develop the program in C to delete a node with the minimum value from a singly
linked list.
16 K2 1
23. Explain with an example the creation of a linked list, insertion and deletion of nodes
and swappind of any two nodes.
16 K2 1
24. Write algorithms to insert and delete elements from a linked list. Consider all cases. 16 K2 1
LIST ADT - ARRAY & LINKED IMPLEMENTATION
25. Describe the data structures used to represent lists. 16 K2 1
LIST ADT - DOUBLY LINKED LIST IMPLEMENTATION
26. Illustrate the algorithm to implement the doubly linked list and perform all the
operations on the created list.
16 K2 1
3. 3
27. Illustrate the necessary algorithms to implement doubly linked list and perform all
the operations on the created list.
16 K2 1
28. Describe the creation of a doubly linked list and appending the list. Give relevant
coding in C.
16 K2 1
LINKED LIST CIRCULAR LINKEDLIST
29. How does a Circular Linked list differ from a Singly linked list? State its
advantages over a Singly linked list. Write algorithms to perform insertion and
deletion on a doubly linked list.
16 K2 -
DOUBLYLINKEDLIST
30. Write an algorithm to perform insertion and deletion on a doubly linked list. 8 K2 1
31. Write a C program that uses functions to perform the following opearations on
doubly linked list a. Creation b. Insertion c. Deletion d. Traversalin both ways
16 K2 1
32. Develop an algorithm to implement a Doubly Linked List. Give relevant example
and diagrammatic illustrations.
16 K2 1
33. Write a procedure to insert a node, delete a node, count and display nodes in doubly
linked list.
16 K2 1
POLYNOMIAL MANIPULATION
34.1. Write a C Program to add two polynomials using linked list. 16 K2 1
35. Explain the following: (8+8)
a. Application of lists
b. Polynomial manipulation
16 K2 1
36. Write a program to add two polynomials using linked list. 16 K2 1
PART C
LIST ADT - ARRAYIMPLEMENTATION
37. Consider an array A[1:n]. Given a position, write an algorithm to insert an element
in the array. If the position is empty, the element is inserted easily. If the postion is
already occupied the element should be inserted with the minimum number of
shifts. (Note: The elements can shift to the left or to the right to make the minimum
number of moves)
16 K3 1
LIST ADT - LINKED IMPLEMENTATION
38. Given two sorted lists L1 and L2, write a procedure to compute
a. L1 intersection L2
b. L1 union L2 using only the basic list operations
10 K3 1
4. 4
39. Formulate an algorithm to perform an insertion in a singly linked list in an
increasing order of their INFO field.
10 K3 1
40. Given two sorted lineat linked lists L1 and L2, how do you create a list L3, which
consisits of the uncommon elements of L1 and L2? Write a suitable ADT for the
construction of doubly linked list L3.
8 K3 1
LINKED IMPLEMENTATION - POLYNOMIAL MANIPULATION
41. Write a program to store the polynomial expression terms in random order, display
the terms in descending order of powers and count the number of terms in the
expression using doubly linked list.
16 K3 1
Staff In – Charge Subject Matter Expert HoD/IT