Questions 61–70 of 84. Imported answers require independent review unless marked reviewed.

Topic practice 84 questionsPage 7 of 9

Question 23

Open question
CSNAT1 markNeeds review
Consider a double hashing scheme in which the primary hash function is

, and the secondary hash function is

. Assume that the table size is 23. Then the address returned by probe 1 in the probe sequence (assume that the probe sequence begins at probe 0) for key value

is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 31

Open question
CSMCQ2 marksNeeds review
Let

be a weighted, undirected graph and let

be a Minimum Spanning Tree (MST) of

maintained using adjacency lists. Suppose a new weighted edge

is added to

. The worst case time complexity of determining if

is still an MST of the resultant graph is
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 40

Open question
CSMCQ2 marksNeeds review
Let

be a directed, weighted graph with weight function

. For some function

, for each edge

, define

as

. Which one of the options completes the following sentence so that it is TRUE? “The shortest paths in

under

are shortest paths under

too, ________.”
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 41

Open question
CSMCQ2 marksNeeds review
In a balanced binary search tree with

elements, what is the worst case time complexity of reporting all elements in range

? Assume that the number of reported elements is

.
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 49

Open question
CSNAT2 marksNeeds review
Consider a graph

where

,

, and weight of the edge

is

. The weight of minimum spanning tree of

is ______.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 52

Open question
CSNAT2 marksNeeds review
Graph

is obtained by adding vertex

to

and making

adjacent to every vertex of

. The minimum number of colours required to edge-colour

is ______.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 12

Open question
CSMCQ1 markNeeds review
Let

be an undirected complete graph on

vertices, where

. Then the number of different Hamiltonian cycles in

is equal to
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 20

Open question
CSNAT1 markNeeds review
An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 2 decimal places) is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 25

Open question
CSNAT1 markNeeds review
Consider a sequence of 14 elements:

. The subsequence sum

. Determine the maximum of

, where

. (Divide and conquer approach may be used.)
Answer: ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 37

Open question
CSMCQ2 marksNeeds review
There are

unsorted arrays:

. Assume that

is odd. Each of

contains

distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of

is
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer