MindTree DSA Quiz 1

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

["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%

Completed

0/10

Accuracy

0%

Prime

Prime Video

Complete Video Course for MindTree

For MindTree
Prime Video

Prime

Prime Mock

Topic-Wise Full Mock and much more

For MindTree
Prime Mock
Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

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.

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.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects

Comments