Top 350+ Solved Data Structures (DS) MCQ Questions Answer

From 16 to 30 of 370

Q. Which of these is not an application of linked list?

a. To implement file systems

b. For separate chaining in hash-tables

c. To implement non-binary trees

d. Random Access of elements

  • d. Random Access of elements

Q. Which of the following is false about a doubly linked list?

a. We can navigate in both the directions

b. It requires more space than a singly linked list

c. The insertion and deletion of a node take a bit longer

d. Implementing a doubly linked list is easier than singly linked list

  • d. Implementing a doubly linked list is easier than singly linked list

Q. What differentiates a circular linked list from a normal linked list?

a. You cannot have the ‘next’ pointer point to null in a circular linked list

b. It is faster to traverse the circular linked list

c. You may or may not have the ‘next’ pointer point to null in a circular linked list

d. Head node is known in circular linked list

  • c. You may or may not have the ‘next’ pointer point to null in a circular linked list

Q. Which of the following application makes use of a circular linked list?

a. Undo operation in a text editor

b. Recursive function calls

c. Allocating CPU to resources

d. Implement Hash Tables

  • c. Allocating CPU to resources

Q. Which of the following is false about a circular linked list?

a. Every node has a successor

b. Time complexity of inserting a new node at the head of the list is O(1)

c. Time complexity for deleting the last node is O(n)

d. We can traverse the whole circular linked list by starting from any point

  • b. Time complexity of inserting a new node at the head of the list is O(1)

Q. Consider a small circular linked list. How to detect the presence of cycles in this list effectively?

a. Keep one node as head and traverse another temp node till the end to check if its ‘next points to head

b. Have fast and slow pointers with the fast pointer advancing two nodes at a time and slow pointer advancing by one node at a time

c. Cannot determine, you have to pre-define if the list contains cycles

d. Circular linked list itself represents a cycle. So no new cycles cannot be generated

  • b. Have fast and slow pointers with the fast pointer advancing two nodes at a time and slow pointer advancing by one node at a time

Q. A linear collection of data elements where the linear node is given by means of pointer is called?

a. Linked list

b. Node list

c. Primitive list

d. Unordered list

  • a. Linked list

Q. In linked list each node contain minimum of two fields. One field is data field to store the datasecond field is?

a. Pointer to character

b. Pointer to integer

c. Pointer to node

d. Node

  • c. Pointer to node

Q. Which hash function satisfies the condition of simple uniform hashing?

a. h(k) = lowerbound(km)

b. h(k)= upperbound(mk)

c. h(k)= lowerbound(k)

d. h(k)= upperbound(k)

  • a. h(k) = lowerbound(km)

Q. What is the hash function used in the division method?

a. h(k) = k/m

b. h(k) = k mod m

c. h(k) = m/k

d. h(k) = m mod k

  • b. h(k) = k mod m

Q. What can be the value of m in the division method?

a. Any prime number

b. Any even number

c. 2p – 1

d. 2p

  • a. Any prime number

Q. Which scheme provides good performance?

a. open addressing

b. universal hashing

c. hashing by division

d. hashing by multiplication

  • b. universal hashing
Subscribe Now

Get All Updates & News