Sei sulla pagina 1di 2

Model Question Paper

Sub.
Q.No. Question Description
Sec.
2. Assume that when you login to your VIT mail account for the first time, your user name is your
register Number (For Example Consider your register No as: 11208) and the password is the
reverse of your user name. Write an algorithm to check the compatibility of user name and
password to log you in without using any built-in functions.
3. A Cafeteria manages its used plates by piling up on a desk. Such that these plates can be taken
away for washing were the plates are removed one by one and cleaned. Device an algorithm to
implement this arrangement of plates.
4. In a theme park, if we want to ride a Jolly park, a person has to enter a compartment which can
hold up to 5 persons. Device a algorithm using linked data structures, such that the person leaving
the compartment is in the order of arrival.
5. In a workshop, each participant is given with unique tag number. The tag numbers are to be
sorted in ascending order such that the participants can be sent to the corresponding session
rooms. In order to sort these tags devise any 2 sorting technique algorithm of your choice and
discuss its complexity.
6. In a military regiment, given the number of soldiers in 6 regiments,15, 19, 10, 7, 17, 16, Sort the
regiments in ascending order using heap sort so that it is organized.

7. A train travelling from Chennai to Bangalore has 5 Coaches [numbered 1,2,3,4,5] filled with
passengers, on arrival at Bangalore the station master decides to do the following with the
coaches:
a) Add an extra passenger coach after coach no 3.
b) Then delete the last coach of the train.
Represent a) and b) concept in Link list diagram representation and write the algorithm for it.
8. The Lucky municipality is planning to implement a new rainwater drainage system that should
connect its 7 Town Panchayat. In the following graph the nodes represent the town Panchayat and
the value associated with the edges represent the cost (in lakhs) of laying the water channel
between the two towns Panchayat. The graph shows all the possible connections among the
nodes. Implement the Prim’s algorithm to find the cost optimal solution (path) that it links the
entire 7 town Panchayat in a non-cyclic path.

9. Device an algorithm to convert algebraic expression (ax+b)/(ax-b) to postfix using a stack array.
10. A trip has been arranged by trekking club to visit a forest. In that forest tents were constructed in
various places for nine groups of students as given below. Find the shortest between all the tents.
Explain all the steps to achieve this.

Time to travel from each node to other is as follows:


AB: 5, AH: 9, AE: 5, BD: 2, CA: 7, CD: 10, CE: 11, DA: 4, DF: 7, DH: 3, EC: 1, EG: 3, FG: 6,
FI: 1, GI: 2, IH:3, HE:2, HG:3.

Potrebbero piacerti anche