Consider a single linked list where F and L are pointers to the first and last…

ISRO Scientist/Engineer SC · 2014 · Computer ScienceModified — slightly modified from the official paper; see the solution

Consider a single linked list where F and L are pointers to the first and last elements respectively of the linked list. The time for performing which of the given operations depends on the length of the linked list?

Singly linked list of six nodes from F at the first node to L at the last node, with arrows linking each node to its successor.
  1. A.

    Delete the first element of the list

  2. B.

    Interchange the first two elements of the list

  3. C.

    Delete the last element of the list

  4. D.

    Add an element at the end of the list

Attempted by 1059 students.

Show answer

Correct answer: C

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…