Quiz-1

Hello PrepSter,

If you find any errors in the quiz below kindly comment in the comment section and we will make it our priority to fix it.

Also if you have a better of the solution to the questions, please do comment them below and if we find it better than ours, we will post it in our website.

Question 1

Time: 00:00:00
Minimum number of queues needed to implement the priority queue?

One

One

Two

Two

Three

Three

Four

Four

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

Please login to submit your explanation

Question 2

Time: 00:00:00
What is the type of the algorithm used in solving the 8 Queens problem?

Backtracking

Backtracking

Recursive

Recursive

Greedy

Greedy

None of these

None of these

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

Please login to submit your explanation

Question 3

Time: 00:00:00
What are the applications of binary tree?

Data Processing.

Data Processing.

Data manipulation

Data manipulation

Data Structure

Data Structure

Cant say

Cant say

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

Please login to submit your explanation

Question 4

Time: 00:00:00
Consider the following definition in c programming language







struct node
{
int data;
struct node * next;
}
typedef struct node NODE;
NODE *ptr;

Which of the following c code is used to create new node?








ptr = (NODE*)malloc(sizeof(NODE));

ptr = (NODE*)malloc(sizeof(NODE));

ptr = (NODE*)malloc(NODE);

ptr = (NODE*)malloc(NODE);

ptr = (NODE*)malloc(sizeof(NODE*));

ptr = (NODE*)malloc(sizeof(NODE*));

ptr = (NODE)malloc(sizeof(NODE));

ptr = (NODE)malloc(sizeof(NODE));

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 properties is associated with a queue?

Last In First Out

Last In First Out

First In Last Out

First In Last Out

First In First Out

First In First Out

None of these

None of these

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

Please login to submit your explanation

Question 6

Time: 00:00:00
What does the following piece of code do?







public Object function()
{
if(isEmpty())
return -999;
else
{
Object high;
high = q[front];
return high;
}
}







Dequeue

Dequeue

Enqueue

Enqueue

Return the front element

Return the front element

None of the mentioned

None of the mentioned

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

Please login to submit your explanation

Question 7

Time: 00:00:00
In a circular queue, how do you increment the rear end of the queue?

rear++

rear++

(rear+1) % CAPACITY

(rear+1) % CAPACITY

(rear % CAPACITY)+1

(rear % CAPACITY)+1

rear–

rear–

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

Please login to submit your explanation

Question 8

Time: 00:00:00
What is the term for inserting into a full queue known as?

Nullpointer flow

Nullpointer flow

Underflow

Underflow

Overflow

Overflow

None of these

None of these

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

Please login to submit your explanation

Question 9

Time: 00:00:00
What would be the solution to the given prefix notation?

- + 5 / 10 5 5

2

2

5

5

10

10

11

11

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

Please login to submit your explanation

Question 10

Time: 00:00:00
What is the time complexity of enqueue operation?

O(logn)

O(logn)

O(nlogn)

O(nlogn)

O(n)

O(n)

O(1)

O(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!"]

Hey ! Follow us on G+