DS M1 QUestion Bank
DS M1 QUestion Bank
DS M1 QUestion Bank
9 Outline KMP algorithm and employ the same to find out the occurrence CO1 L3
of the following pattern:
P: ABCDABD
S: ABC ABCDAB ABCDABCDABDE
10 What is a polynomial? Design an algorithm to add two polynomials CO1 L3
using ADT Polynomial(c = a + b)
11 Define stack. Explain the different operations that can be performed on CO1 L3
stack with suitable C functions and examples.
12 Convert the following infix expression to postfix expression using CO1 L3
stack. (A + ( B * C – ( D / E ^ F) * G ) * H
13 Outline the algorithm for infix to postfix and apply the same to CO1 L4
convert following infix expression to postfix expression.
((H*((((A+((B+C)*D))*F)*G)*E))+J)
14 How to declare and initialize pointers? Explain with an example. CO1 L4
15 Illustrate the representation of 2-D arrays in memory with suitable CO1 L4
example.
16. Implement Stack using Dynamic memory Allocation . CO1 L3