Robert Bosch Arrays, Linked Lists, Trees, Graphs Quiz 4

Question 1

Time: 00:00:00

What is the AVL tree's maximum height when it has p nodes?


N

N

(log n)

(log n)

n/2

n/2

(log n)/2

(log n)/2

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

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
Why is splay tree preferred?

easier to code

easier to code

efficiency of space

efficiency of space

fast looking

fast looking

quicker access to frequently used objects and easy to programme

quicker access to frequently used objects and easy to programme

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 is not a benefit that trees provide?

Hierarchical structure

Hierarchical structure

Faster search

Faster search

Router algorithms

Router algorithms

Undo/Redo operations in a notepad

Undo/Redo operations in a notepad

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 code ?
#include
using namespace std;

int main(){

int arr[5] = {2,4,3,5,6,};

for(int i=0 ; i<3; i++){
arr[i] = arr[i+1] + arr[i+2];
}

for(int i=0;i<5;i++){
cout<<arr[i]<<" ";
}
return 0;
}

7 8 11 8 9

7 8 11 8 9

7 8 11 5 6

7 8 11 5 6

1 3 4 5 6

1 3 4 5 6

8 5 3 2 10

8 5 3 2 10

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
What will be the value of x in the following code?
#include
using namespace std;

int main(){
int a=10, b=5;
a = a^b;
b = b^a;
a = a^b;

int x=a/b;

return 0;
}

2

2

0.5

0.5

Zero

Zero

2.1

2.1

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
The value of postfix expression 6 3 2 4 + – * is

-18

-18

1

1

18

18

12

12

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

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
The necessary data structure to determine whether an expression has balanced parenthesis is

Stack

Stack

Queue

Queue

Graph

Graph

Array

Array

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 data structure needed for a graph's breadth-first traversal is :

Stack

Stack

Array

Array

Queue

Queue

Tree

Tree

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 Queue follow which of the following principle

LIFO Principle

LIFO Principle

FIFO Principle

FIFO Principle

Linear tree

Linear tree

Ordered array

Ordered array

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
A data structure where elements can only be added to or removed from the ends but not the middle is called

Queue

Queue

Stack

Stack

Linked list

Linked list

Array

Array

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%

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