Dsa 2022
Dsa 2022
Reg. No.:
Name :
PART-A
P.T.0.
PART - B
Answer any one full question from each module, Each question carries 20 marks.
Module -|
11. Write an algorithm to inserting a node in to a singly linked list.
(a) inserting at the front
(b) inserting at the end
(c) inserting at any position
20
OR
Module-||
13. (a) Generate a binary tree from its inorder and
preorder Travesal
Inorder : DHHEAIFJCG
Predorder: ABDEHCFIJG
12
(b) Explain Linear Representing of a binary tree.
8
OR
44. á) Assume that a stack is
represented using linked list. Write
following operations. algorithms for the
) PUSH
(i) POP
10
(b Write an iterative algorithm to
perform inorder traversal ofa binary tree.
(c) What is a binary search Tree (BST)?
nodes. Give example of a BST with five
2
P-6356
Module -||
20
% Explain Buddy System
OR
15
16. (a) Explain Compaction
5
(b) Explain internalfragmentation
Module -IV
10
17a Write an algorithm for merge sort
(b) Trace the working of the quick sort algorithm on the following 10
(4x 20 = 80 Marks)
P-6356