Data Structure Quiz 1

Question 1

Time: 00:00:00
What is the worst case time complexity to sort an array which contains only three values 3,4 and 5 ?

O(nlogn)

O(nlogn)

O(n)

O(n)

O(n^{2})

O(n^{2})

O(1)

O(1)

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

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
What is the worst case time complexity to find if there is any duplicate element or not if the values of the element is less than the 2*n where n is the size of the array.?

O(1)

O(1)

O(n)

O(n)

O(nlogn)

O(nlogn)

O(n^{2})

O(n^{2})

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

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
In breadth first search of graph , which data structure is used.?

Stack

Stack

Queue

Queue

Array

Array

Linked list

Linked list

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

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
If the numbers 4,3,2,1 are placed in a queue(in that order) and then removed one at a time. In what order they will be removed ?

1,2,3,4

1,2,3,4

4,3,2,1

4,3,2,1

1,2,4,3

1,2,4,3

4,3,1,2

4,3,1,2

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
Suppose the numbers 1,2,3,4,5 and 6 arrive in an input stream in that order. Which of the following sequences can be realized as the output of a double ended queue ?
I)1 2 3 4 5 6
II)2 4 3 6 5 1
III)6 5 4 3 2 1
IV)1 5 2 4 3 6

I only

I only

I , III only

I , III only

II and IV only

II and IV only

All of these

All of these

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
In an empty queue, rear and front can be initialized as

Rear = front = -1

Rear = front = -1

Rear = front = 1

Rear = front = 1

Rear = 0 and front = -1

Rear = 0 and front = -1

Rear = -1 and front = 0

Rear = -1 and front = 0

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

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
Which type of list is used if we can concatenate two list in O(1) time ?

Singly linked list

Singly linked list

Doubly linked list

Doubly linked list

Circular doubly linked list

Circular doubly linked list

Array implementation of list

Array implementation of list

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

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
Which data structure satisfies the following characteristics ?

  • Items are retrieved and removed from the collection in FIFO order


  • There is no prior limit on the number of items in the collection.


  • The size of an item is large relative to the storage required for a memory address.




Singly linked list with head and tail pointers

Singly linked list with head and tail pointers

Doubly linked list with only head pointer

Doubly linked list with only head pointer

Binary tree

Binary tree

Hash table

Hash table

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

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
If we have a single pointer to a node and there is no pointer to head then is it possible to delete that node ?

Possible if size of linked list is even

Possible if size of linked list is even

Possible if size of linked list is odd

Possible if size of linked list is odd

Possible if x is not first node

Possible if x is not first node

Possible if x is not last node

Possible if x is not last node

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 much pointer is modified when we insert a record in a circular linked list ?

No pointer

No pointer

1 pointer

1 pointer

2 pointer

2 pointer

3 pointer

3 pointer

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/0

Accuracy

0%