[go: up one dir, main page]

0% found this document useful (0 votes)
50 views13 pages

aiml dsa (1)

The document outlines a comprehensive set of questions and tasks related to data structures and algorithms, categorized into sections with varying marks. It covers fundamental concepts such as definitions, complexities, algorithm analysis, and various data structures including linked lists, trees, and graphs. Additionally, it includes practical coding tasks and theoretical discussions on sorting and searching techniques.

Uploaded by

pradeepsai2901
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)
50 views13 pages

aiml dsa (1)

The document outlines a comprehensive set of questions and tasks related to data structures and algorithms, categorized into sections with varying marks. It covers fundamental concepts such as definitions, complexities, algorithm analysis, and various data structures including linked lists, trees, and graphs. Additionally, it includes practical coding tasks and theoretical discussions on sorting and searching techniques.

Uploaded by

pradeepsai2901
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/ 13

TITLE OF THE PAPER: DATA STRUCTURES AND ALGORITHMS

SUBJECT CODE: 22CBCE35/22CBAD33

(Common to IT and AI&DS)

SECTION – A (2 MARKS)

S.No Questions Unit

Write down the definition of data structures? What is the I


1.
need of DS.

2. Give few examples and applications for data structures? I


Define Algorithm? Mention the features of an efficient
I
3. algorithm?

Find the complexity of the below recurrence:


I
4. { 3T(n-1), if n>0,
T(n) = { 1, otherwise

5. What are the three stages of problem solving aspects? I


Find the Time complexity for the recurrence Equation by
I
6. Backward substitution Method

Explain the three cases during algorithm analysis


7. I
Find the Time and Space complexity for the following
I
Program:
#include<stdio.h>
void main()
{
8. int i, n = 8;
for (i = 1; i&lt;= n; i=i*2) {
printf(“HELLO STUDENTS!!!\n”);
}
}

How an algorithm is analyzed for predicting efficiency?


9. I
Find out the order of growth for linear, quadratic, cubic and
I
10. exponential equation.

Write a Non-recursive algorithm for counting number of I


11.
bits.

12. Define Asymptotic notations. I


What will be the time complexity of the following code?
I
i) for (var i=0; i<n; i++)

i*=k

13. ii) int value = 0;


for (int i=0; i<n; i++)

for (int j=0; j<i; j++)

value += 1;

Write three cases for solving recurrence relation using I


14.
Master method.

Construct the recurrence tree for the equation I


15.
T(n)=a T(n/b) + f(n)

16. Develop routine to check whether the list is empty or not. II

17. Write a routine for node structure in doubly linked list II

Create doubly Linked List representation with size 4 and II


18.
write c program for same.

19. Create routine for insert one element in linked list. II

20. Distinguish singly linked list from doubly linked list. II

How to access data in 3*3 matrix/grid in multidimensional II


21.
array data structure?

Create a routine for operations as push() and pop() in the II


22.
stack.
Write down the basic operations performed in Queue data II
23.
structure.
Explain the operations involved in stack data structure.
24. II

Write down the applications, advantages and disadvantages II


25.
of array data structure.

Illustrate with example how stack implement using singly II


26.
linked list.

27. Give five real time examples for queue. II


Evaluate and find prefix and postfix expression for the
II
following equation:
28.
(((a+b)*c)-((d-e)*(f+g)))

29. Define Queue. Represent the Queue data structure. II


Distinguish between Stack and Queue.
30. II

31. How the insertion sort is done with the array? III

32. Define sorting. Explain the types of sorting. III

Demonstrate the selection sort results for each pass for the III
33. following initial array of elements
21 6 3 57 13 9 14 18 2

Find the time complexity for the following sorting technique. III
34.
a) Quick sort and b) Merge Sort.

35. Develop an algorithm for bubble sort. III

Which sorting technique is based on divide-and-conquer III


36.
paradigm?

Write down a few benefits and limitations of Quick Sorting III


37.
algorithm.
How many passes are required to perform the insertion sort III
38. for the listed elements?
8 23 32 36 45 78

For which type of searching the array of elements should be III


39.
arranged either in ascending or descending order.
Write any two applications of linear search algorithm.
40. III

Perform linear search algorithm for an element III


41.
92,87,53,10,15,23,67 with the key value is 15

42. Compare Internal Sorting with External Sorting techniques III

What are the factors to be considered while choosing sorting III


43.
techniques?

44. Compare the linear search with binary search algorithm. III

Which Sorting techniques has the time complexity of O(n III


45.
log n)?

46. Define Non-Linear Data Structure. IV

47. What is Complete Binary Tree? IV

48. Define Tree. IV

49. What do you mean by level of the tree? IV

50. What is meant by traversing and explain its types? IV

51. What is meant by binary search tree? IV

52. Define Depth and height of the tree. IV


Define Graph.
53. IV
Differentiate DFS and BFS.
54. IV

55. Name the different ways of representing a graph? IV

What is a Minimum Spanning Tree? Name any two IV


56.
algorithms for it.
57. Define complete binary tree? IV

Prove that the maximum number of edges that a graph with n IV


58.
Vertices is n*(n-1)/2.

What is the use of Kruskal’s algorithm and who discovered IV


59.
it?

60. List out two important key points of depth first search. IV

61. Illustrate when the AVL tree is said to imbalanced. V

Define a heap. How can it be used to represent a priority V


62.
queue?

63. Define hashing function. V

64. What is open addressing ? V

65. Identify the problems occur in hashing? V

66. Define collision in hashing. V

67. What is heap and how many types of heaps are available? V

68. Define AVL Tree V

69. What is extendible hashing? V

70. What is AVL Tree Rotations and its types? V

List out few advantages and disadvantages of quadratic V


71.
probing.

72. What do you mean by separate chaining? V

73. List the importance of hashing? V

74. What do you mean by linear probing? V


Perform RL rotations for the following tree V

75.

SECTION – B (16 MARKS)

S. No Questions Unit
Construct an algorithm to display the factorial of the
I
number and compute the time complexity using
backward substitution method.
int funt( int n)
{
if ( n == 0 ) return 1;
1.
else
{
return (n*funt( n - 1);
}
}

a) Develop an algorithm to compute the sums for the


I
first n terms

2. S=1+ (1/2) + (1/3) +…. (8)

(b) Discuss in detail about the implementation of the


algorithm. (7)

Explain the analysis of algorithm along with its types.


3. I
Define data structures. Explain the classification of
I
4. data structures.
Explain asymptotic notations and its types along with I
5.
mathematical framing.
Construct an algorithm for “ Tower of Hanoi” and
I
6. also find the time complexity of the algorithm.

Solve the recurrence relation T(n)= 2T(n/2)+n using I


7.
Recursion Tree Method.
Create an algorithm for counting binary bits using I
8.
recursive and non-recursive method.
I
Explain the characteristics of algorithm (7)
9.
Describe the categories of algorithm with example (8)
I
What is Data Structure? Explain the classification of
10.
data structure with suitable example
Build an algorithm for Fibonacci numbers using I
11.
recursive and non-recursive method.
I
Explain various kinds of algorithm analysis to find
12.
the efficiency.
I
13. Describe the properties of Asymptotic notations.
I
Evaluate Space and time complexity for “Addition of
14.
two scalar variables”. Write Psuedo-code for same.
Consider the recurrence relation T(n)=T(n/3)+T(2n/3) I
15.
+ n and solve using Recursion Tree Method.

How insertion and deletion operations implemented II


16. in singly Linked List with example? Create C routine
for both operations.
Write an algorithm to evaluate a postfix expression
II
and explain it with example (8)
17.
Write an algorithm to convert infix to postfix
expression and explain it with example (7)
(a)Write an algorithm for insertion and deletion
II
operation in a circular queue (7)
18.
(b) Create an algorithm for operations in Deque (8)

Evaluate the following expression into Postfix


II
expression
19.
(a) A+(B*C-(D/E^F)*G)*H
(b) A+(B*C)-D/E
What is Queue ADT? What operations can be
II
performed on it? Discuss the implementation of queue
20.
using Linked list.

Create a playlist that plays the nursery rhymes one


II
after the other until it reaches the last song of the list.
Assume that the playlist contains 5 nursery rhymes
21.
such as Baby Shark, Finger Family, Ten in the Bed,
Humpty Dumpty, Wheels on the Bus.

Assume that the array contains the Register number of


II
II year B.Tech students.

Regist 11001 11002 11003 11004 11006 11007


er No
22.
A new Student with register number “11005” is
admitted to the course. Write a routine to insert his
register number to the list at index 4.

What is Circular Linked List? State the advantages and


II
disadvantages of Circular Link List Over Doubly
23. Linked List and Singly Linked List. Also write
advantages of Linked List over an Array.
Explain the operations in Double Ended Queue with II
suitable example.

a) Insertion at Front end

24. b) Insertion at Rear end

c) Deletion at Front end

d) Deletion at Rear end

Write and explain the algorithm for create, insertion II


and traverse operations in doubly linked list with
25.
example.

Explain any two applications of Lists with suitable II


examples.

26. a) Polynomial Manipulation

b) Josephus Problem

a) Write an algorithm and pseudocode to multiply two II


polynomials. (8)
27.
(b) Write an algorithm and pseudocode to add two
polynomials. (8)
Convert the following expression into Prefix II
expression. Create routine for the same expression.
28.
(A+B)*(C-D).

Explain the linked list representation of a list with an II


29. example.

Explain applications of Queue with suitable examples. II


30.

Write algorithm and pseudocoe for selection sorting III


31.
with a suitable example.
Explain the algorithm for Divide and Conquer III
32. algorithm and give a suitable example.

Write an algorithm for Bubble sorting. a)Which type III


33. of technique does it belong? b) What is the worst and
best case time complexity of bubble sorting?

Develop an algorithm for Insertion sorting method and III


34. perform the same for the list of array elements
35 18 7 12 5 23 16 3 1

Analyze the different types of sorting methods and III


35. find out which sorting is best based on time
complexity of the algorithm.

36. Discuss the algorithm of merge sort with an example.


III
Write a routine to sort the elements using insertion
37. III
sort, Selection sort and Bubble Sort.

Write a procedure for sorting a given list of elements


III
38. using Quick sort method. Show the division of the
list in the quick sort for a list of 10 numbers.

Develop a routine to sort the elements using Divide III


39.
and Conquer algorithm.

Construct the binary search algorithm and find the key III
40. element 35 from the given list of sorted elements in an
array A=[2,12,30,35,46,53,60,70,75]

(a)Write an Algorithm for finding the square root of III


‘n’ and it belongs to which searching method.(7)
41.
(b) Explain Linear Search Algorithm with its
advantages and disadvantages. (8)

Explain the types of searching techniques in data III


42.
structure.

Illustrate an example for performing linear Search III


43.
algorithm.
Write a C program to perform searching operations III
44.
using linear and binary search.

Discuss the ways to implement Binary Search III


45.
Algorithm.

Create a binary search tree for IV


46.
45,15,79,90,10,55,12,20,50

47. Explain BFS with an example. IV

Explain the Deletion of a node from binary search IV


48.
tree.

49. Construct an algorithm for single source shortest path. IV

What is minimum spanning tree? Explain its concept IV


50.
with any one algorithm.

Write the step by step process to implement Dijkstra’s IV


51.
algorithm.

52. Explain the Kruskal’s algorithm with an example. IV

Construct an algorithm for Expression Tree for the IV


53.
expression a + b - c * d + e*f

Illustrate Depth First Search Algorithm with an IV


54.
example.

(a) Explain types of Tree Traversal in detail. (8) IV


55. (b) What is Binary Tree, Full Binary Tree, Complete
Binary Tree? (7)

Construct an BST for the Following Key elements IV


56. and Perform Preorder Traversal 4 2 3 6 5 12 9 8 11 15
19 20 7
Find the Shortes Path from Source node 0 to all nodes IV
using Dijkstra’s Algorithm.

57.

Illustrate a Graph with its basic Terminology and how IV


58.
will you represent the Graph.

59. Differentiate a Binary Tree from Binary Search Tree IV

Analyze the Time Complexity of Binary Search Tree IV


60.
with Binary Tree and explain the application of BST

61. Construct an AVL tree with all of its basic operations V

62. Differentiate open hashing and closed hashing V

Explain the recent trends in Algorithm and Data V


63.
structures in detail

64. Explain Rehashing in detail. V

65. Illustrate double hashing concept in detail V

66. How to implement priority queue using heap V

Explain the various types of rotations in AVL tree V


67.
with example

Explain AVL Rotation, Insertion and Deletion V


68.
Operation in detail.

V
69. Construct an AVL Tree for the given sequence 21, 26, 30,
9, 4, 14, 28, 18,15,10, 2, 3, 7 in step by step process

70. Illustrate a Heap Sort Algorithm with an example V


Explain Open Hashing and Closed Hashing with an V
71.
example.
Evaluate the Performance of Quadratic Probing and
V
72. Random Probing Algorithms in modeling Hashing
Technique.

73. Compare the AVL ,BST and BT in Data Structure V

Explain Extendible Hashing in detail with an example. V


74.

Explain Linear Probing and Quadratic Probing in V


75.
detail

You might also like