Question 1

Time: 00:00:00
Which of the available sorting techniques is stable?

Straight Insertion sort

Straight Insertion sort

Binary Insertion Sort

Binary Insertion Sort

Shell sort

Shell sort

Heap Sort

Heap Sort

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 2

Time: 00:00:00
Think about an array where bubble sort is applied.The bubble sort will compare the element A[x] with a single iteration to which of the given elements?

A[x+1]

A[x+1]

A[x+2]

A[x+2]

A[x+2x]

A[x+2x]

All of the above

All of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 3

Time: 00:00:00
Which of the following doesn't use a divide and conquer strategy?

Insertion Sort

Insertion Sort

Merge Sort  

Merge Sort  

Heap Sort

Heap Sort

Shell Sort

Shell Sort

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 4

Time: 00:00:00
What is the output of the following code?

 

public void function(Node node)

{

if(size == 0)

head = node;

else

{

Node temp,cur;

for(cur = head; (temp = cur.getNext())!=null; cur = temp);

cur.setNext(node);

}

size++;

}

Inserting the node at the beginning of the list

Inserting the node at the beginning of the list

Inserting the node at the end of the list

Inserting the node at the end of the list

Deleting the node at the beginning of the list

Deleting the node at the beginning of the list

Deleting the node at the end of the list

Deleting the node at the end of the list

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 5

Time: 00:00:00
Which of the following is not true about Circular linked list

For every node there is a successor

For every node there is a successor

Time complexity of inserting a new node at the head of the list is O(1)

Time complexity of inserting a new node at the head of the list is O(1)

Time complexity for deleting the last node is O(n)

Time complexity for deleting the last node is O(n)

Traversal can be done through the whole linked list from the start to the end point

Traversal can be done through the whole linked list from the start to the end point

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 6

Time: 00:00:00
Which of the following statements about a breadth-first search is TRUE?

Beginning from a node, all the adjacent nodes are traversed first.

Beginning from a node, all the adjacent nodes are traversed first.

Starting from a node, the next neighbouring node is traversed after each adjacent node has been thoroughly explored.

Starting from a node, the next neighbouring node is traversed after each adjacent node has been thoroughly explored.

Beginning from a node, the nodes are traversed in cyclic order.

Beginning from a node, the nodes are traversed in cyclic order.

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 7

Time: 00:00:00
A Binary Tree's pre-order and post-order traversals yield the same results.

The tree can have maximum

One node  

One node  

Two nodes

Two nodes

Three nodes

Three nodes

Any number of nodes

Any number of nodes

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 8

Time: 00:00:00
The first member in a list is substituted with any element smaller than it by a sorting algorithm, which goes over the list iteratively.A fresh first element is used to repeat it after that.How do you refer to this sorting algorithm?

Heap sort

Heap sort

Quick sort

Quick sort

Insertion sort

Insertion sort

Selection sort

Selection sort

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 9

Time: 00:00:00
A binary tree's post order traversal is DEBFC.Identify the pre order traversal from the given options.

ABFCDE

ABFCDE

ABDCEF

ABDCEF

ADBFEC

ADBFEC

ABDECF

ABDECF

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 10

Time: 00:00:00
How many nodes have at least one other node before or after them in a doubly linked list?

N+1

N+1

N

N

N-2

N-2

N-1

N-1

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Comments