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

14 Marks Imp Questions

The document contains 6 units of questions for a 14 Marks exam. Each unit covers different data structures and algorithms topics like time and space complexity, arrays, strings, linked lists, stacks, queues, trees, graphs, searching and sorting algorithms. For each unit, there are 6 questions worth 7 marks each. The questions test concepts, writing programs/algorithms and solving problems related to the various topics.

Uploaded by

Puduru Bharathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
322 views

14 Marks Imp Questions

The document contains 6 units of questions for a 14 Marks exam. Each unit covers different data structures and algorithms topics like time and space complexity, arrays, strings, linked lists, stacks, queues, trees, graphs, searching and sorting algorithms. For each unit, there are 6 questions worth 7 marks each. The questions test concepts, writing programs/algorithms and solving problems related to the various topics.

Uploaded by

Puduru Bharathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

14 Marks Imp Questions

UNIT-1
1. a) Explain about different notations for time complexity and space complexity of
algorithms.[7M]
b) Write a C program to traverse an array in reverse order. [7M]

2. a) Write about the classification of data structures. [7M]


b) Explain about different operations in String ADT.[7M]

3. a) With a neat sketch, explain the model of ADT. [7M]


b) Explain how linear arrays are stored and traversed.[7M]

4. a) List and explain different operations performed on data structures. [7M]


b) Write a C program to add two matrices, using multidimensional arrays. [7M]

5. a) Write a program for matrix addition, multiplication using multi-dimensional array


and compute time and space complexities.[7M]
b) Write about insertion, deletion, and traversal of elements in a linear array. Discuss
the merits and demerits also.[7M]

6. a) How to calculate space and time complexity of an algorithm? Illustrate. [7M]


b) Write a short note on multi-dimensional arrays.[7M]

UNIT-2
1. a) Discuss the role of stacks in executing recursive procedures. [7M]
b) What is a priority queue? Explain different methods of implementing them. [7M]

2. a) Show the detailed contents of stack to evaluate the given postfix expression:
{1 2 3 + * 3 2 1 – + *}.[7M]
b) Write an algorithm to find factorial of a given number using recursion.[7M]

3. a) Write an algorithm/program that gives solution for Towers of Hanoi problem with n
disks.[7M]
b) With array representation, explain the basic queue operations.[7M]

4. a) Explain how postfix expressions are evaluated using stacks. Give an example. [7M]
b) Differentiate between regular queues and circular queues with insert and delete
operations.[7M]\

5. a) Explain how an infix expression can be converted into postfix expression, using
stacks. Give an example.[7M]
b) Write and explain the queue ADT. [7M]

6. a) Perform enqueue and dequeue operations in a queue. How do they differ from
circular queue operations? Explain.[7M]
b) Evaluate following expression. Write program to evaluate postfix expressions.
i) 10+3-2-8/2*6-7 ii) (12-(2-3)+10/2+4*2).[7M]
UNIT-3

1. a) Write a C function to implement insert operation in a circular linked list. [7M]


b) Explain with an example, how linked lists can be used for sparse matrix representation
and computations.[7M]

2. a) Write a C program to traverse a given single linked list in reverse order. [7M]
b) Explain with an example, how linked lists can be used for polynomial representation.[7M]

3. a) Discuss the advantages and limitations of linked lists. [7M]


b) Write a C program to implement queues using linked lists.[7M]

4. a) Differentiate between arrays and linked lists. [7M]


b) Write a C program to implement stacks using linked lists, doubly and circular
linked lists.[7M]

5. a) Compare the performance of linked lists, stack, and queues with their sequential
counterparts.[7M]
b) Write an algorithm to perform insertion, deletion, and display in a doubly-linked
list.[7M]

6. a) List out the differences between array and linked list. [7M]
b) Write the procedure to add two polynomials using linked list.[7M]

UNIT-4

1. a) What is a threaded binary tree? Discuss its advantages and limitations. [7M]
b) Insert the sequence of integers 13, 3, 4, 12, 14, 10, 5, 1, 8, 2, 7, 9, 11, 6 and 18 in an
initially empty Binary Search Tree. Then delete 5 and 1. (Present the operations one
after the other in the same order).

2. a) Discuss about different representations of binary trees. Give an example for each. [7M]
b) Insert the sequence of integers 10, 20, 30, 40, 50, 60, 70, 80 and 90 in an initially
empty B-Tree. Then delete 40 and 70. (Present the operations one after the other.)[7M]
3. a) Write recursive functions for inorder, preorder and postorder traversal in a binary
tree.[7M]
b) Construct a max heap from the sequence of integers 13, 3, 4, 12, 14, 10, 5, 1, 8, 2, 7,
9, 11, 6 and 18. Then delete 2 minimum elements. (Present the operations one after
the other in the same order.)[7M]
4. a) Explain the procedure for deletion of an element from a binary search tree. [7M]
b) Present the preorder, inorder and postorder traversal of the below binary tree:[7M]
5. a) Write Recursive Algorithms for Pre-order, In-order, and Post-order traversals of
binary trees and explain them.[7M]
b) Write a function to find an element and its position in a binary search tree.[7M]
6. a) Define a Max Heap. Construct a max heap for the following:
{12, 15, 9, 8, 10, 18, 7, 20, 25}.[7M]
b) How can we make an unbalanced tree as a balanced one? Explain various
rotations that are involved in it. Give examples for each rotation.[7M]

UNIT-5
1. a) Compute shortest paths between every pair of vertices in the graph below using
appropriate algorithm.[7M]

b) Write notes on basic operations performed on graphs and challenges involved.[7M]

2. a) Differentiate between BFS and DFS with algorithms and examples. [7M]
b) Compute minimum cost spanning tree for the graph below using Prim’s algorithm:[7M]

3. a) What is transitive closure? Compute transitive closure of the graph given below,
using Warshall’s algorithm:[7M]
b) Write and explain Kruskal’s algorithm for finding minimum cost spanning tree of a
graph.[7M]

4. a) Explain about various graph representations. Discuss the pros and cons of each. [7M]
b) Using Dijkstra’s algorithm, find shortest paths from vertex 0 to remaining vertices
in the graph given below.[7M]

5. a) How to find out the minimum cost spanning tree using the Prims algorithm? Explain
its algorithmic concept.[7M]
b) What is the articulation Point? What is its role in biconnected components? Explain
the program for finding articulation points.[7M]
6. a) Differentiate BFS and DFS. [7M]
b) Explain Kruskal’s algorithm with an example.[7M]

UNIT-6

1. a) Write and explain Fibonacci Search algorithm. [7M]


b) Sort the below list of elements in ascending order using heap
sort:6, 8, 7, 9, 1, 4, 3, 2, 5, 0.[7M]

2. a) Write and explain Binary Search algorithm. Also mention its time complexity. [7M]
b) Sort the below list of elements in ascending order using quick
sort:29, 23, 17, 57, 34, 89, 65, 27.[7M]

3. a) Give a comparison between several searching techniques. [7M]


b) Write and explain iterative merge sort algorithm, with an example. [7M]

4. a) What is hashing? Explain its role, advantages and disadvantages w.r.to searching. [7M]
b) Sort the below list of elements in ascending order using shell sort:
3 7 9 0 5 1 6 8 4 2 0 6 1 5 7 3 4 9 8 2 [7M]

5. a) What are the applications of hashing? Explain different methods for resolving
collisions.[7M]
b) Take a list of unsorted elements and sort them with selection sort and bubble sort.[7M]

6. a) Explain quick sort algorithm and simulate it for the following data:
20, 35, 10, 16, 54, 21, and 25.[7M]
b) Write an algorithm for linear search. [7M]

You might also like