0% found this document useful (0 votes)
8 views

YCH_END_SEM_EXAM

Qp

Uploaded by

ewasrai85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

YCH_END_SEM_EXAM

Qp

Uploaded by

ewasrai85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Time Allotted: 3 Hours Full Marks: 70 Marks

The figure in the margin indicates full marks


Candidates are required to give their answers in their own words as per as prac cable

Group-A (Very short answer type ques ons)

1. Answer any ten of the following [ 1× 10 = 10]


I. Define the term "hash collision."
II. What is the purpose of a hash func on in hash tables?
III. How is a two-dimensional array stored in memory?
IV. Define the term "leaf node" in a binary tree.
V. What is the purpose of a "pivot" in the quicksort algorithm?
VI. Define the term "merge step" in merge sort.
VII. A data structure is a par cular way of________________ and __________ data
either in computer's memory or on the disk storage so that it can be used
efficiently.
VIII. what ac on are performed when a func on is called?
IX. what is dangling pointer and how to avoid it?
X. which data structure is used to perform recursion?
XI. Define Time Complexity of an algorithm?
XII. What is binary search tree?
Group-B ( short answer type ques ons)
[ 5× 3 = 15]
Answer any three of the following

2. Write a C Func on to implement ‘PUSH’ and ‘POP’ opera on in a stack.

3. what are the difference between general tree and binary tree.

4. Calculate the Time-Complexity of an Quick Sort algorithm.

5. Suppose a queue is implemented by an array. Write an algorithm to insert an new

element at the kth posi on of the array.

6. Construct a binary search tree form the following numbers and do Inorder, Preorder and

Postorder traversals:

56,34,45,37,48,87,63,75,59,94,67

Group-C (Long answer type ques ons)


[ 5× 3 = 45]
Answer any three of the following

7. (a) The Pre-order and In-order traversals sequence of a nodes in a binary tree are given

below:

(b) Define Hashing.


(c) Insert a flowing numbers into a binary search tree in the order that they are given

and draw the resul ng tree:

87,36,22,15,56,85,48,91,72,6

Delete 48 and draw the resul ng tree. Then Delete 15 and draw the resul ng tree.

8. (a) What are the Best, Worst, & Average case me complexity of an binary search

algorithm

(b) How linear search is different form binary search.

(c) What will be the complexity of the following opera ons – Merge Sort, Shell Sort,

Selec on Sort

(d) what is the difference between recursion and iterea on.

9. (a) Write the following func on for a linked list.

I. insert new element in a list.


II. Delete form a list.
III. Reverse a list.

(b) How can a polynomial such as 6x6 + 4x3 – 2x + 10 be represented by a linked list?

. ( c ) Difference between linear and non linear data structure. Give two example.
10. (a) Convert the following infix expression into pos ix form by using the stack.

A+(B*C-(D/E^F)*G)*H

(b) write a c func on to perform inser on and dele on opera ons of a queue.

( c) write are the difference between stack and queue. What is sparse matrix? Explain

with an example.

11. (a) Construct a AVL tree with the following nodes-

34, 67, 4, 56, 44, 55, 671, 345, 567, 2, 5, 89, 93, 23.

Show all steps.

(b) Write a C Func on for Inser on sort

(c ) Write a short note on ADT

You might also like