Professional Documents
Culture Documents
Submitted Through Any Other Mode Will Not Be Considered Submitted and Will Not Be Marked
Submitted Through Any Other Mode Will Not Be Considered Submitted and Will Not Be Marked
Read carefully the question first, and then ask for the queries.
Student are required to Submit/turn in their Assessments on Google classroom only, Assessment
submitted through any other Mode will not be considered submitted and will not be marked.
Student are Required to attempt the assessment in a word file.
The name of file must include student registration No and Name.
Copy pasted Answers may result in zero marks for the question.
___________________________________________________________________________
____________________
‘Attempt all questions’
1. Find a Spanning tree from the given using Breadth First Search. Provide the out degree of the given graph.
2. Assume that you are have to store that data of books in an organized way. More books should be
added one side and removed from the other side of the shelf. Determine and mention the suitable data
structure for this situation .Provide the list of operations performed using the opted data structure.
Discuss whether the implementation of the data structure is static, dynamic or both.
3. Consider all the digits of your roll number. Update each number by adding 3 in each digit.
Demonstrate what happens when you insert the updated values in a hash table with collisions resolved
by Linear probing. Let the table have 9 slots. Provide hash function as well.
Sort the above numbers using insertion sort (step by step) and discuss about its complexity as well.
5. Consider A, B, C, D, E and F are six different tourism places in Lahore. Here we are assuming that
you are availing “Careem” facility in order to cover the distance and visit various places. Let’s assume
that your starting point is A, find the shortest routes to other places of Islamabad using such an
algorithm that only accepts positive values of weight after completing the given graph by replacing x
with the third last digit of your roll number, y with the second last digit and z with the last digit of your
roll number. If the digit is zero, the add 2 in it and the update the graph. Moreover create a graph from
the given contingency matrix.