CS33201-AS01 (1)
CS33201-AS01 (1)
Assignment-1
(1) Define how polynomials be represented using linked lists .Explain how to add two polynomials using linked list
representation? (BL-3)
(3) Explain the difference between Array & Linked list. (BL-2)
(4) Explain Sparse matrix. Discuss its representation in term of lower triangular matrix. (BL-2)
(5) Define Data structures and its types. Mention the factors that affecting the choice of a data structure. (BL-2)
Assignment-2
(1) Discuss the concept of Stacks. Explain PUSH and POP algorithm in stack with the help of diagram.
(BL-2)
(2) Consider the following arithmetic Infix Expression Q:
Q: A+ (B*C- (D/ E^F) *G) *H (BL-3)
(3) Write down algorithm to evaluate postfix expression and also evaluate given postfix expression using
the algorithm (BL-2)
P: 5, 6 ,2, +, *,12, 4, /,-
(4) Define linked representation of stack. Write an algo for insertion of nodes in linked stack.
(BL-2)
(5) Define the recursion. Write a recursive algorithm to calculate the factorial of the given number.
(BL-2)
Assignment-3
(1) Define Tower of Hanoi problem. Explain the solutions of Tower of Hanoi problem using recursion
where number of disks n= 3 and towers are A, B and C.
(2) Define Queue with example. Write an algorithm to perform insertion into a Queue.
(3) Write a short note on: (BL-2)
a) Dequeue b) Priority Queue
c) Tail recursion d) Circular Queue
(4) Draw the stack structure in each case when the following operations are performed on an
empty stack. (BL-2)
a) Add A, B, C, D, E, F
b) Delete two letters
c) Add G
d) Add H
e) Delete four letters
f) Add I.
(5) Consider the following linear queue capable of accommodating maximum five elements. Front
= 2 Rear = 4, “_ ”denotes an empty queue location. (BL-3)
Queue: _ L, M, N, _
Compute following operations
(i)Add O (ii) Add P (iii) Delete two letters (iv) Add Q, R
Assignment-4
(1) Construct a binary tree with following traversals: (BL-3)
In-order: B F G H P R S T W Y Z
Pre-order: P F B H G S RY T W Z
(2) Explain the concept of a binary tree. Draw a binary tree for the following algebraic
expression:
[a + (b-c)]*[(d-e) / (f+g-h)] (BL-2)
(3) Write a short note on : (BL-2)
a) Degree of the node b) Degree of Tree
c) Level of the Tree d) Internal & External node
(4) Explain the concept of Binary tree. Define the linked representation of binary trees with
Example. [BL-2]
5) Explain B Tree with suitable example. Also define its insertion and deletion of elements
[BL-2]