Concepts7

⚙️AlgorithmIntermediate

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.

#lis#lnds#patience sorting+12
⚙️AlgorithmIntermediate

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.

#longest increasing subsequence#lis#dynamic programming+12
⚙️AlgorithmIntermediate

Coordinate Compression

Coordinate compression replaces large, sparse, or arbitrary values with small consecutive integers while preserving relative order.

#coordinate compression#discretization#lower_bound+12
⚙️AlgorithmIntermediate

Binary Search

Binary search quickly finds targets or boundaries in sorted or monotonic data by halving the search interval each step.

#binary search#lower_bound#upper_bound+11
🗂️Data StructureIntermediate

Merge Sort Tree

A Merge Sort Tree is a segment tree where every node stores the sorted list of values in its segment.

#merge sort tree#segment tree#range query+12
🗂️Data StructureIntermediate

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).

#ordered set#ordered map#std::set+12
🗂️Data StructureBeginner

Array and Vector

Arrays and vectors store elements contiguously, giving O(1) random access via index.

#std::vector#dynamic array#reserve+12