🧪 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

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




2. 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




3. 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?




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




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




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




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




8. 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?




9. What kind of linked list is best to answer questions like �What is the item at position n?�




10. In Linked List implementation, a node carries information regarding ___________




11. Linked list data structure offers considerable saving in _____________




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




13. 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); }




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




15. 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?




16. 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?




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




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




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




20. What is the space complexity for deleting a linked list?




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