Linked List MCQ

Linked List MCQ

University

8 Qs

quiz-placeholder

Similar activities

Linkedlist

Linkedlist

University

10 Qs

PDS - 04225 Lists, Stacks and Queues - Chapter 5

PDS - 04225 Lists, Stacks and Queues - Chapter 5

University

10 Qs

DS UNIT-2 TEST-1

DS UNIT-2 TEST-1

University

10 Qs

C++ linked list

C++ linked list

University

10 Qs

CSC248 Revision 1

CSC248 Revision 1

University

10 Qs

Pre-Test on List Data Structure | DSA

Pre-Test on List Data Structure | DSA

University

8 Qs

Linked List

Linked List

University

6 Qs

Data Structure and Algorithms Semi-Final Examination

Data Structure and Algorithms Semi-Final Examination

University

13 Qs

Linked List MCQ

Linked List MCQ

Assessment

Quiz

Computers

University

Hard

Created by

Rejimoan R

Used 5+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 2 pts

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 and II

I, II and III

I, II and IV

I and III

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

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?

Possible if X is not first node

Possible if size of linked list is even

Possible if size of linked list is odd

Possible if X is not last node

3.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

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

Heap

Static

Compile time

Dynamic

4.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Linked list data structure offers considerable saving in _____________

Computational Time

Space Utilization

Space Utilization

Speed Utilization and Computational Time

5.

MULTIPLE SELECT QUESTION

30 sec • 2 pts

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

Arrays have better cache locality that can make them better in terms of performance

It is easy to insert and delete elements in Linked List

Random access is not allowed in a typical implementation of Linked Lists

Access of elements in linked list takes less time than compared to arrays

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

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

Prints all nodes of linked lists

Prints alternate nodes in reverse order

Prints alternate nodes of Linked List

Prints all nodes of linked list in reverse order

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of the following function to start pointing to the first node of the following linked list? 1->2->3->4->5->6

void fun(struct node* start)

{ if(start == NULL) return;

printf("%d ", start->data); 

if(start->next != NULL )

fun(start->next->next);

printf("%d ", start->data); }

  1. 1 4 6 6 4 1

  1. 1 3 5 1 3 5

  1. 1 2 3 5

  1. 1 3 5 5 3 1

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about linked list implementation of queue?

In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end.

In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from the beginning

Both of the above

Both of the above