πŸ§ͺ Data structure MCQ Quiz Hub

Data Structure Questions and Answers – Singly Linked

Choose a topic to test your knowledge and improve your Data structure skills

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





βœ… Correct Answer: 1

Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time? i) Insertion at the front of the linked list ii) Insertion at the end of the linked list iii) Deletion of the front node of the linked list iv) Deletion of the last node of the linked list





βœ… Correct Answer: 2

What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list?





βœ… Correct Answer: 3

What would be the asymptotic time complexity to insert an element at the front of the linked list (head is known)?





βœ… Correct Answer: 1

What would be the asymptotic time complexity to find an element in the linked list?





βœ… Correct Answer: 2

What would be the asymptotic time complexity to insert an element at the second position in the linked list?





βœ… Correct Answer: 1

The concatenation of two lists can be performed in O(1) time. Which of the following variation of the linked list can be used?





βœ… Correct Answer: 3

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?





βœ… Correct Answer: 1

What kind of linked list is best to answer questions like οΏ½What is the item at position n?οΏ½





βœ… Correct Answer: 3

In Linked List implementation, a node carries information regarding ___________





βœ… Correct Answer: 3

Linked list data structure offers considerable saving in _____________





βœ… Correct Answer: 3

Which of the following points is/are not true about Linked List data structure when it is compared with an array?





βœ… Correct Answer: 4

What does the following function do for a given Linked List with first node as head? void fun1(struct node* head) { if(head == NULL) return; fun1(head->next); printf("%d ", head->data); }





βœ… Correct Answer: 2

In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is?





βœ… Correct Answer: 4

Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can we delete the node X from given linked list?





βœ… Correct Answer: 1

You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?





βœ… Correct Answer: 3

Which of the following is not a disadvantage to the usage of array?





βœ… Correct Answer: 4

What is the time complexity of inserting at the end in dynamic arrays?





βœ… Correct Answer: 4

What is the time complexity to count the number of elements in the linked list?





βœ… Correct Answer: 2

What is the space complexity for deleting a linked list?





βœ… Correct Answer: 1

Which of these is not an application of a linked list?





βœ… Correct Answer: 4