Articles for author: Rishiraj Kalita

Segment tree with lazy propagation

A Segment Tree is an efficient and flexible data structure that is used to solve range queries while handling updates at the same time. The lazy Propagation technique is used in a segment tree to solve range queries in O(log n) time complexity. In lazy propagation, we make copy nodes for each node in the ...

Articulation Points and Bridges

Articulation Points in a network represent single points of failure. That is if we remove a vertex that is an articulation point in the network the number of connected components in that network increases. A connected component is defined as a sub-graph or a sub-network in which one node can be reached from every other ...

The Knapsack Problem

The Knapsack Problem is an Optimization Problem in which we have to find an optimal answer among all the possible combinations.There are three types of knapsack problems : 0-1 Knapsack, Fractional Knapsack and Unbounded Knapsack. In this article, we will discuss 0-1 Knapsack in detail. Scope of Article What is 0-1 Knapsack Problem In the ...

Bit Masking

A bit is a boolean value that can be either 0 or 1. Bitmasking is the act of applying a mask over a value to keep, change or modify a piece of given information. A mask determines which bits to take and which bits to clear off a binary number. Bitmasking can be used to ...

Persistent Segment Tree

A persistent data structure is a data structure that can retain its past forms when an update operation is applied to it. A Persistent Segment Tree is used when we want to implement persistency in a Segment Tree. A persistent segment tree can can preserve its past states and can handle updates at the same ...

Trie Data Structure

Trie data structure is an advanced data structure used for storing and searching strings efficiently. Trie comes from the word reTRIEval which means to find or get something back. Dictionaries can be implemented efficiently using a Trie data structure and Tries are also used for the autocomplete features that we see in the search engines. ...