Search Header Logo

Linked List Quiz

Authored by SARMILA B

Mathematics

University

Used 19+ times

Linked List Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of following function in which start is pointing to the first node of the following linked list 1->2->3->4->5->6 ?

1 4 6 6 4 1

1 3 5 1 3 5

1 2 3 5

1 3 5 5 3 1

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the optimal time complexity to count the number of nodes in a linked list?

O(n)

O(1)

O(log n)

O(n log n)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity to insert an element to the front of a LinkedList(head pointer given)?

O(n)

O(1)

O(log n)

O(n log n)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of a program to reverse a linked list?

O(n)

O(1)

O(log n)

O(n log n)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following problems can be solved using 2 pointers on linked list?

Detecting cycle in a Linked List

Finding intersection of two linked lists

Finding middle of a linked lists

All the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following operations is performed more efficiently by doubly linked list than by linear linked list? (ISRO CS 2001)

Deleting a node whose location is given

Searching an unsorted list for a given item

Inserting a node after the node with a given location

Traversing the list to process each node

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider a singly linked list of the form where F is a pointer to the first element in the linked list and L is the pointer to the last element in the list. The time of which of the following operations depends on the length of the list?

Delete the last element of the list

Delete the first element of the list

Add an element after the last element of the list

Interchange the first two elements of the list

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?