Distinguish between a singly and a doubly linked list.
Linked Lists
Original Khojo Papers practice question — not from a past board paper.
If start is null the list is empty and there is nothing to delete. Otherwise take the data from the node start points at, then move start to start.next, so the old first node is no longer reachable and is collected by the garbage collector.
No citable source has been recorded for this record. Treat it as practice material, not as fact.
Deleting from the middle needs the previous node, which is why a doubly linked list is often more convenient.
From the same topic and chapter, at a similar level.
Distinguish between a singly and a doubly linked list.
Linked Lists
Write the Java class definition of a node of a singly linked list holding an integer.
Linked Lists
What is a linked list? State two advantages it has over an array.
Linked Lists
Write the algorithm to insert a node at the beginning of a singly linked list.
Linked Lists
State and verify the absorption law X + X·Y = X using a truth table.
Boolean Algebra
Write a recursive Java method to compute the factorial of a non-negative integer n.
Recursion