Data Structures & Algorithms
237 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Reverse Linked Listhistorical
Given a linked list, reverse it and return the head of the reversed list.
- Merge Intervalshistorical
Given a collection of intervals, merge all overlapping intervals and return the resulting coverage.
- Min Stackhistorical
Design a stack that supports push, pop, and top, and can retrieve the minimum element in constant time.
- Merge Two Sorted Linked Listshistorical
Given two monotonically increasing linked lists, merge them into one linked list that remains monotonically non-decreasing.
- K-th Node from the End of a Linked Listhistorical
Given a linked list, return its k-th node from the end.
- Median of Two Sorted Arrayshistorical
Given two sorted arrays of lengths m and n, find the median of their combined values.
- Jump Gamehistorical
Each element of a nonnegative integer array gives the maximum jump length from that position. Determine whether the last position is reachable.
- Copy Complex Linked Listhistorical
Given a complex linked list (each node contains a node value and two pointers, one pointing to the next node and another special pointer pointing to any node), return the head of the copied complex linked list.
- Shortest Unsorted Continuous Subarrayhistorical
Given an integer array nums, find a continuous subarray such that sorting only this subarray in ascending order makes the whole array sorted in ascending order.