Persistent Segment Trees
In competitive programming, Segment Tree is itself a great data structure that comes into play in many cases. In this post we will introduce the concept of Persistency in this data structure. Persistency simply means to retain the changes. But obviously, retaining the changes cause extra memory consumption and hence affect the Time Complexity.
Our aim is to apply persistency in segment tree and also to ensure that it does not take more than O(log n) time and space for each change.
25 Essential Concepts for Competitive Programming
Competitive Programming is a mental sport which enables you to code a given problem under provided constraints. The purpose of this article is to provide an overview of the most frequent tricks used in Competitive Programming.
These 25 tricks will help you master competitive programming and solve the problems efficiently: