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

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

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

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

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

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

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

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

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

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

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