Computer Science and Information Technology
GATE CSE Algorithms PYQs
Build your understanding with focused practice from past exam papers.
Questions 41–50 of 84. Imported answers require independent review unless marked reviewed.
Question 15
Open questionCSMCQ1 markNeeds review
Consider the problem of reversing a singly linked list. To take an example, given the linked list below,

the reversed linked list should look like

Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in
space?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 answerQuestion 16
Open questionCSMCQ1 markNeeds review
Suppose we are given
keys,
hash table slots, and two simple uniform hash functions
and
. Further suppose our hashing scheme uses
for the odd keys and
for the even keys. What is the expected number of keys in a slot?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 answerQuestion 30
Open questionCSNAT1 markNeeds review
Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have 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 answerQuestion 49
Open questionCSMSQ2 marksNeeds review
Consider a simple undirected weighted graph
, all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of
is/are TRUE?Your answerSelect all correct options. You can choose more than one.
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 answerQuestion 58
Open questionCSNAT2 marksNeeds review
Let
be a directed graph, where
is the set of vertices and
is the set of directed edges, as defined by the following adjacency matrix
.
indicates a directed edge from node
to node
. A directed spanning tree of
, rooted at
, is defined as a subgraph
of
such that the undirected version of
is a tree, and
contains a directed path from
to every other vertex in
. The number of such directed spanning trees rooted at vertex 5 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 answerQuestion 1
Open questionCSMCQ1 markNeeds review
Let
be a connected undirected weighted graph. Consider the following two statements.
: There exists a minimum weight edge in
which is present in every minimum spanning tree of $G.
: If every edge in
has distinct weight, then
has a unique minimum spanning tree.Which one of the following options is correct?
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 answerQuestion 2
Open questionCSMCQ1 markNeeds review
Let P be an array containing
integers. Let
be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary array of
elements. Which one of the following choices is correct?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 answerQuestion 2
Open questionCSMCQ1 markNeeds review
Let
be a binary min-heap consisting of
elements implemented as an array. What is the worst case time complexity of an optimal algorithm to find the maximum element in
?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 answerQuestion 3
Open questionCSMCQ1 markNeeds review
Consider the following three functions.
Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
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 answerQuestion 8
Open questionCSMCQ1 markNeeds review
What is the worst-case number of arithmetic operations performed by recursive binary search on a sorted array of size
?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