Lesson overview · Free interview practice

Linked Lists

Learn about the various types of linked lists and their operations.

Topics in the full lesson
  • Concept and Use Cases
  • Types of Linked Lists
  • When to Use
  • Time and Space Complexity
  • Linked List Operations and Methods
  • Practical Tips and Tricks
  • Common Gotchas
  • Advanced Topics
  • Linked List Algorithms
  • Interview Tips and Tricks
  • Common Mistakes

Practice Problems

Work through a question before revealing its explanation. These questions and answers are free; Premium adds the full lesson walkthrough, examples and implementation detail.

Completion marks record your own progress, not an automatically checked result. The task type does not determine whether it is optional.

Question

You are given the task to determine whether a singly linked list is a palindrome, meaning that its contents read the same backward as forward.

Take a moment to think about this before revealing the answer

Explain your reasoning or try an implementation before comparing answers.

Question

You're tasked with creating a function that can copy a linked list, including the random pointers, while preserving their original values and connections.

Take a moment to think about this before revealing the answer

Explain your reasoning or try an implementation before comparing answers.

CodingMedium

Add Two Numbers

Question

You are given two non-empty linked lists representing two non-negative integers, with their digits stored in reverse order (the ones digit first). Add the two numbers and return the sum as a linked list, also with its digits in reverse order.

Take a moment to think about this before revealing the answer

Explain your reasoning or try an implementation before comparing answers.

CodingMedium

LRU Cache

Question

Design an LRU (Least Recently Used) cache supporting get(key) and put(key, value) in O(1) average time. get returns the value or -1 if absent and marks the key as most recently used; put inserts or updates a key and, when capacity is exceeded, evicts the least recently used entry.

Take a moment to think about this before revealing the answer

Explain your reasoning or try an implementation before comparing answers.

Explore the full Linked Lists material

Premium includes the complete lessons and implementation references. Free practice questions remain available without a subscription.

All course tracks & premium content
From basics to advanced masterclasses
Built for JS/TS developers like you
Real-world tips & common pitfalls
Upgrade to Premium