Skip to content

Linked Lists

Problem Complexity Key Pattern
Lru Cache O(1) for both get and put O(1) cache with eviction — "design LRU/LFU cache", bounded-memory
Merge Two Sorted O(n + m) Merge step of merge sort — combining two sorted sequences into one.
Reverse Linked List O(n) In-place linked list reversal — "reverse list", "reverse sublist",