Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q-1 Sort the following array using Insertion and Selection Sort: 6, 2, 9, 11, 9, 3,7 Q-2 (5 Marks) Consider inserting the keys 10, 22,

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Q-1 Sort the following array using Insertion and Selection Sort: 6, 2, 9, 11, 9, 3,7 Q-2 (5 Marks) Consider inserting the keys 10, 22, 31, 4, 15, 28, 17, 88, 59 into a hash table of length m 11 using open addressing with linear probing, we use the hash function h{k, i) = (k+i) mod m. Q-3 i. List the nodes visited in the order of a {Depth First Search, Breadth First Search} of the (5 Marks) given Tree 10 11 12 ii. Draw the graph of the following 5 X 5 matrix: W=[01100,10011, 00101,01 001,01010], give the in-degree and out-degree of cach node. Q-4 (7.5 Marks) Answer the following questions: i. Consider A, B, C, D, E and F are six different tourism places in Islamabad. Here we are assuming that you are availing Uber facility in order to cover the distance and visit various places. Let's assume that your starting point is C, find the shortest routes to other places of Islamabad using Dijkstra's algorithm. A 4 2 B F 1 1 8 E D ii. Convert the following equation to the infix notation using any methodology of your choice. ABC*D-E / + F + Q-5 (7.5 Marks) Answer the following questions: i. Find MST of following given graph using Prims as well as Kruskals Algorithm. And prove which method is best in terms of space and time. 3 N 1 A 6 2 F ii. Sort the following array in alphabetic order using Heap sort:IC, O, M, P, U, T, E, R]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

T F News releases are the least used type of publicity.

Answered: 1 week ago