dsa2 min read
Add Two Numbers II — Stack to Handle Forward Order
Add two numbers given in forward order by pushing digits to stacks, then building the result list in reverse.
Read →
webcoderspeed.com
1276 articles
Add two numbers given in forward order by pushing digits to stacks, then building the result list in reverse.
Partition a linked list around value x into less-than and greater-than-or-equal chains, then join them.
Sort a linked list in O(n log n) time and O(log n) space using top-down merge sort with fast/slow split.
Remove all nodes that have duplicate numbers from a sorted linked list using a dummy head and skip logic.
Deep copy a linked list with random pointers using either a hash map or the O(1) space interleave technique.