Data Structures JAN-2022 Sem - I (S.Y.B.Tech COMP)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

CUMMINS COLLEGE OF ENGINEERING

FOR WOMEN
(An Autonomous Institute affiliated to Savitribai Phule Pune
University)
Second Year Computer
DATA STRUCTURES (20CE302)

Duration : 02:00 Hours Max Marks : 50

Instructions :

1. Allquestions are compulsory.


2. Use of scientific calculators is allowed.
3. Draw diagrams wherever necessary.
4. Assume suitable data if necessary.

Unit-1
Q No 1 a) A) Find the values of ‘C’ and n0 for the big ‘O’ notations (7)

for the following function


n^3 +20n+1.
(04 marks)

B) Find frequency count for the following function.

void fun()
{
for(i=0;i<n ;i++)
for(j=0;j<i ;j++)
{
if (i == n)
return -i;
}
}
(03 marks)
Unit-2
Q No 2 a) Compare Linear queue and Circular queue. (2)

Unit-3
Q No 3 a) Suppose information of participants (7)

(participant-id,name,team-name,mobile no, etc) of a


tournament is stored in a Binary Search Tree. Develop an
algorithm to delete a particular entry from BST.
Unit-4
Q No 4 a) A) Consider the following graph represents the network (17)

of all houses in any area of the city. Company wants to


survey about its products in that area. Find a solution for
the company such that it will complete the survey within
a short time period and cover all houses under that area.
(You may consider vertex1 as starting vertex)

(07 Marks)

B) Suppose the railway network of a country is


represented using Graph data structure. Vertices
represents cities and edges represents distance between
any two connected cities. Develop an algorithm to find
shortest path between given source and destination city.
(10 marks)
Unit-5
Q No 5 a) A) Given the input (17)

(789,756,778,658,437,399,267,128,445) and hash


function h(x)=(x mod 10), show the result for open
addressing using linear probing and quadratic probing.
(10 marks)

B) Suppose product order information of a shopping


website (order-id, customer-id, name, address, mobile no,
bill amount etc) are stored in a hash table. Develop an
algorithm to insert new order information and search
order from the system.
(07 marks)

You might also like