Swap Nodes in Pairs (LeetCode 24)
The problem You get the of a linked list. Swap every two adjacent nodes and…
Tag
24 posts
The problem You get the of a linked list. Swap every two adjacent nodes and…
The problem You get the of a linked list and a non-negative integer . Rotate…
The problem You get the of a linked list and a positive integer . Reverse the…
The problem You get the of a linked list and two 1-indexed positions . Reverse…
The problem You get the of a singly linked list. Reverse the list so the last…
The problem You get the of a singly linked list . Rearrange it in place into…
The problem You get the of a singly linked list and an integer . Remove the n…
The problem You get the of a linked list sorted in ascending order. Remove…
The problem You get a perfect binary tree: every internal node has exactly two…
The problem You get the of a singly linked list of integers. Return if the…
The problem You get the of a linked list. Reorder it so all nodes at odd…
The problem You get the of a singly linked list. Return the middle node. If the…
The problem You get the heads of two linked lists, each already sorted in non…
The problem You get an array of linked lists, each sorted in ascending order…
The problem Design a class that stores up to key-value pairs and supports…
The problem You get the of a singly linked list. Some node’s may point back to…
The problem You get the of a singly linked list that may contain a cycle…
The problem You get the heads of two singly linked lists, and . At some node…
The problem Each node in a linked list has a , a pointer, and a pointer that…
The problem Two non-negative integers are stored as linked lists, one digit per…
Linked-list questions scare people, but almost all of them come down to one…
Ten problems that drill the linked-list reversal / pointer-surgery pattern from…
Ten problems that drill the fast & slow pointer pattern (Floyd’s tortoise-and…
Fast & slow pointers (Floyd’s “tortoise and hare”) is a small, elegant trick…