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 , II, III and IV

I , II, III and IV

II and IV only

II and IV only

I , III only

I , III only

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