Resource · Guide or article
Linked list cheatsheet for coding interviews
Linked list interview notes covering singly, doubly, and circular lists and the few routines most questions are built from. Assumes you can already write a node class.
Reviewed
Open the original: Linked list cheatsheet for coding interviews (opens the original site in a new tab)Practice this topicOpens the practice interviewer in Technical / coding mode; choose a question there.
Add to a roadmap
Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.
Source content: English
Like arrays, a linked list is used to represent sequential data. It is a linear collection of data elements whose order is not given by their physical placement in memory, as opposed to arrays, where data is stored in sequential blocks of memory. Instead, each element contains an address of the next element. It is a data structure consisting of a collection of nodes which together represent a sequence.
PrepKit overview
PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.
- Suited to
- The source does not state a level
- Format
- Cheatsheet
What it covers
- Four routines: counting nodes, in-place reversal, finding the middle with fast and slow pointers, and merging two lists.
- Sentinel or dummy nodes to avoid head and tail special cases, with a reminder to remove them afterward.
- Two-pointer uses: kth node from the end, cycle detection, and the middle node.
- Interviewers usually expect in-place changes rather than building a new list.
- Library table listing C++ std::list and Java LinkedList, and nothing for Python or JavaScript.
How to use it
PrepKit study advice, not a claim made by the source.
Write in-place reversal and fast-slow middle finding from scratch, then run both on an empty list, one node, and two nodes. Redo one problem with a dummy head and count how many null checks you removed.
Scope and limitations
No code samples; routines are prose only. The text says only Java ships a linked list while its own table also lists C++, so rely on the table. Ends with an imported Recommended courses block whose links are not in the recorded file, so PrepKit has not reviewed them.
Access and format
Web page on techinterviewhandbook.org, free to read online in English; the text comes from the MIT-licensed yangshun/tech-interview-handbook repository.
Reviewed by PrepKit on Oct 2, 2026. Listing source commit: e1d28e8886c0
Evidence behind this overview
- apps/website/contents/algorithms/linked-list.md
Pages that include this
Get the PrepKit newsletter
Optional. You don't need it to use PrepKit.