Concepts7
LIS Variants
LIS variants extend the classic longest increasing subsequence to handle non-decreasing sequences, counting how many LIS exist, and maximizing the sum of a subsequence.
Longest Increasing Subsequence
The Longest Increasing Subsequence (LIS) is the longest sequence you can extract from an array while keeping the original order and making each next element strictly larger.
Coordinate Compression
Coordinate compression replaces large, sparse, or arbitrary values with small consecutive integers while preserving relative order.
Binary Search
Binary search quickly finds targets or boundaries in sorted or monotonic data by halving the search interval each step.
Merge Sort Tree
A Merge Sort Tree is a segment tree where every node stores the sorted list of values in its segment.
Ordered Set and Map
std::set and std::map store elements in sorted order using a balanced binary search tree (typically a Red-Black Tree).
Array and Vector
Arrays and vectors store elements contiguously, giving O(1) random access via index.