HCSCR3052T
HCSCR3052T
XAVIER’S COLLEGE
KOLKATA
(AUTONOMOUS)
• Only HAND WRITTEN answer scripts (using black or blue ink) on A4 size sheets will be
considered.
• Answer in your own words as far as practicable.
• Save the scanned pages to a single PDF file and name the document accurately i.e.
RollNo_PaperCode.PDF (example: 147_HPHCR2032T).
• Students have to write legibly their answers on A4 size sheets, scanning them and sending the entire
answer script as one PDF file to the following email address within 30 minutes of the completion
of the examination:[email protected]
• In the subject field of your email, please write “Answer Script – Roll No, Paper Code” (example:
“Answer Script – 147, HPHCR2032T”).
• The scanned answer scripts should have enough clarity to enable evaluation.
• On top of each page the following information should be entered by the student: Name, Roll
Number, Paper Code, Date, and Page Number
• No multiple submissions would be allowed.
The marks are given in brackets [ ] at the end of each question or part question.
2021 1
Of the questions attempted, the answers to only the first required number of
questions (as stipulated in the question paper) will be evaluated.
So, PLEASE DO NOT ATTEMPT EXTRA QUESTIONS.
GROUP A
Answer QUESTION NO. 1 and ANY ONE from the rest.
2. (a) What are the different types of linear data structures? Give proper examples to
discuss the answer.
(b) Write a C function to reverse a singly linked list. Explain the code.
(c) The running time of an algorithm is given as: T(n) = T(n/2) + 1, for n ≥ 2 and
T(n) = 1, for n = 1. Here ‘n’ is the input size. Can the time complexity of this
algorithm be logarithmic? Justify.
(d) What is a Reverse Polish Notation? Using a stack, convert the following infix
expression to its equivalent Reverse Polish Notation: (A + B – C) * (D + E / F).
[3+4+3+(1+4)=15]
GROUP B
Answer QUESTION NO. 4 and ANY ONE from the rest.
(b) How many different types of binary trees can be developed by n nodes? Draw the
expression tree for the arithmetic expression: A = (2x+3y)(6a – b)3 [1+4=5]
(c) Write a C function to calculate the total number of non-terminal nodes in a BST. [5]
2021 2
5. (a) Construct a binary search tree from the following keys. Perform the inorder
traversal on the tree.
90, 36, 58, 96, 32, 92, 12, 93, 24, 97, 38, 60, 58
(b) Create a binary tree whose inorder traversals and postorder traversals are
respectively given by the following sequences of elements:
JFCIHABDGE
JFIHCGDEBA
(c) Define the heap data structure. Create a max-heap for the following set of
elements:
25, 35, 18, 9, 46, 70, 48
All the steps should be shown. [5+5+5=15]
***************
2021 3