DSAmid 2019
DSAmid 2019
DSAmid 2019
Q2. [5]
a) What are the different asymptotic notations used for algorithm analysis? - CO1
A[R, C] is a 2-D array. The base address is BA, the size of each element is W, the
lower limit of the row subscript is LBR and the lower limit of the column subscript
is LBC. Find the address of the element A[I, J], if the array is stored in i) Row major
form and ii) Column major form.
OR
b) What are the characteristics of an algorithm? - CO1
Represent the amount of time using the Ɵ notation for the following code segment:
OR
b) Write an algorithm to convert an infix expression to postfix expression. - CO2
The following postfix expression with single digit operands is evaluated using a
stack:
823^/23*+51*-
What are the top two elements of the stack after the first * is evaluated?
Q4. [5]
a) Write short notes on i) Array vs Linked List - CO4
ii) Circular Queue vs Linear Queue
OR
b) Write a program to create a single linked list and perform the following operations: - CO3
i) Find out the largest element.
ii) To search an element