Skip to main content

Singly Linked List

Learn Singly Linked List (Linked List, Data Structures & Algorithms) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

What is a Singly Linked List? A chain of nodes , each holding a value and a reference to the NEXT node - unlike an array, the elements are NOT contiguous in memory. head points to the first node; the last node's next is null . Insertion/deletion at the FRONT is O(1) - no shifting needed, unlike an array. Random access ( get(i) ) is O(n) - there's no direct index, you must walk from the head.

More lessons in Linked List