Dsa Qb Modulewise (1)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

MODULE 1

1) Differentiate between the Structure and Union with examples

2) Illustrate how Bubble sort algorithm helps to sort the following list of integers
32,51,27,85,66,23,13,57 Support your answer using Bubble sort algorithm

3) a) For the given string ‘babaabababaa’ search the pattern ‘aaba’using Knuth Morris Pratt or
Secondary pattern matching algorithm. Illustrate the process using Pattern matching table and
Graph.(values may change)

4) Why insertions and deletions of elements are difficult in the middle of arrays. Discuss with
examples

5) Illustrate different ways to represent the elements of 2-D array of size (3*4) in the memory.

6) Design a function in C to read the elements of 4*5 Sparse matrix. Illustrate how to represent the
given sparse matrix using arrays(matrix may change)

7) Discuss the space and time complexity of algorithms.

8) There is a list of integer elements that are stored as 1D array 11,12,34,45,55,66,89,98 Apply a best
suitable search algorithm to find the element (34).Illustrate the steps of algorithm and reasons for
choosing that particular algorithm(input may change)

10)Discuss about the linear data structures

11)”Dynamic memory allocation is a required for efficient memory management”. Justify this
statement using dynamic memory management functions in C

19) Write a program to illustrate functions of Dynamic memory allocation.

20)Implement a Program in C for the following operations on Strings:

i. Read a main String (STR), a Pattern String (PAT) and a Replace String (REP)

ii. Perform Pattern Matching Operation: Find and Replace all occurrences of PAT in STR with REP if
PAT exists in STR.

iii. Report suitable messages in case PAT does not exist in STR

Support the program with functions for each of the above operations. Don't use Built-in functions
MODULE 2

9) Design an algorithm to implement push and pop functions of Stack using arrays with StackFull and
StackEmpty conditions

12)Discuss the three ways to store the strings into the memory and give reason which one is the
best and efficient

13)Outline Ackermann function in detail with Examples

14)Write a program to perform push and pop operations in Stacks using dynamic arrays

18) Solve the following infix expression to postfix expression using stack

i)A $ B * C – D + E|F|(G+H) ii)(A+B)+C/D*E

21) Illustrate IsFull and IsEmpty functions using Stacks with example

22) Implement the recursive function for the following: i). Factorial of a number ii.) Tower of Hanoi

MODULE 3

15)Summarize the Double ended queue and Priority Queue

16)Demonstrate the working of circular queue of integers using array to perform the following
operations: (i) Insert (ii) Delete (iii) Display

23) Summarize the following with examples:

i) Input restricted and output restricted dequeue.

ii) Double ended queue and Priority Queue

34) Discuss the concept of Multiple Stacks and Queue

25) Explain the different types and applications of Queues

MODULE 4

26) Differentiate between singly Linked List and Doubly Linked List.

27) What is linked list? Write the program for create and traverse operations in single linked list with
example.

28) Illustrate the following functions to create a node for:

i) Circular Singly Linked List

ii) Circular doubly Linked List

29) Write the program for create, insertion and traverse operations in doubly linked list with real-
time example

36) Apply the algorithm for create and traverse operations in single linked list with example
MODULE 5

30) Implement recursive function for different traversal techniques of a binary tree with examples.

31) Describe AVL Trees, AVL Rotations and Balance factor with examples.

32) Implement the insertion, deletion and search operations on AVL trees.

33) Discuss the advantages and disadvantages of threaded binary trees

37) Apply a recursive Algorithm for pre order traversal, post order traversal and Inorder traversal
with examples

38) Distinguish between the types of Binary Trees in detail

Questions from internal question banks:

5) Design a C function to add two polynomials. 𝐴(𝑥) = 2𝑥 1000 + 1 𝐵(𝑋) = 𝑥4 + 10𝑥 3 + 3𝑥 2 + 1


Illustrate the memory efficient way to store the above polynomials in thememory. Justify your
answer(value may change)

14) b)Create a structure EMPLOYEE that contain the following data members Empid, EmpName,
EmpDept, declare its variables and represent how we can access its data members using variables

6.What is well defined recursive function. Write the recursive function algorithm for
1)factorial 2)fibonnacci series

10.What is Euclidean algorithm to find the GCD. Discuss by taking two numbers .(value of 2 numbers
can also be given)

11.What is queue data structure? Show the represenation of queue into the memory

15.Write an algorithm to convert infix to postfix. solve the following (a*b)+c using above
algorithm(expression can change).

16.write the applications of stacks. Discuss anyone in detail .

17.circular queue using dynamic array

REFER QB FOR IA3 FULL.

You might also like