Concepts3
βοΈAlgorithmIntermediate
Think Backwards (Reverse Thinking)
Think Backwards is a problemβsolving pattern where you reverse time or direction so hard deletions become easy insertions and the final state becomes the starting point.
#think backwards#reverse thinking#offline queries+12
βοΈAlgorithmIntermediate
Sweepline Technique
The sweep line technique processes geometric or time-based events in sorted order and maintains an active set that reflects the current state at the sweep position.
#sweep line#plane sweep#active set+12
βοΈAlgorithmIntermediate
Mo's Algorithm
Mo's algorithm answers many range queries offline by reordering them to minimize pointer movement along the array.
#mo's algorithm#offline queries#range queries+12