• Data Structure Reference

• Other Reference

# MCQ - Linked List in Data Structure

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

A. I and II
B. I and III
C. I, II and III
D. I, II and IV

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

A. Pointer to character
B. Pointer to integer
C. Pointer to node
D. Node

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

A. O(1)
B. O(n)
C. O(n2)
D. None of the mentioned

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

D. Array implementation of list

15. Consider the following definition in c programming language.Which of the following c code is used to create new node?

```
struct node
{
int data;
struct node * next;
}
typedef struct node NODE;
NODE *ptr;
```

A. ptr = (NODE*)malloc(sizeof(NODE));
B. ptr = (NODE*)malloc(NODE);
C. ptr = (NODE*)malloc(sizeof(NODE*));
D. ptr = (NODE)malloc(sizeof(NODE));

16. What kind of linked list is best to answer question like "What is the item at position n"?

D. Array implementation of linked list

17. Linked lists are not suitable to for the implementation of?

A. Insertion sort
C. Polynomial manipulation
D. Binary search

18. Linked list is considered as an example of ___________ type of memory allocation.

A. Dynamic
B. Static
C. Compile time
D. None of the mentioned

19. In Linked List implementation, a node carries information regarding

A. Data
D. None of the mentioned

20. Linked list data structure offers considerable saving in

A. Computational Time
B. Space Utilization
C. Space Utilization and Computational Time
D. None of the mentioned