## Maximum Subarray Sum in a given Range

Given an array of n numbers, the task is to answer the following queries: maximumSubarraySum(start, end) : Find the maximum subarray sum in the range… Read More »

- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Design a Chess Game
- Count of words that are present in all the given sentences
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Lazy Propagation in Segment Tree | Set 2
- Count of strings whose prefix match with the given string to a given length k
- Longest string in an array which matches with prefix of the given string
- Persistent Trie | Set 1 (Introduction)
- Rearrange numbers in an array such that no two adjacent numbers are same
- Range Queries to Find number of sub-arrays with a given xor
- Program to implement Run Length Encoding using Linked Lists
- Sort an array of strings based on the frequency of good words in them
- Introduction to R-tree
- Queries to update a given index and find gcd in range
- Find triplet such that number of nodes connecting these triplets is maximum
- Find the number of different numbers in the array after applying the given operation q times
- Flipping Sign Problem | Lazy Propagation Segment Tree
- Find a pair from the given array with maximum nCr value
- B-Tree Insert without aggressive splitting
- Arrange array elements such that last digit of an element is equal to first digit of the next element
- Index of kth set bit in a binary array with update queries
- Implement a Dictionary using Trie
- Strings from an array which are not prefix of any other string
- Gap Buffer Data Structure
- Insertion in a Trie recursively
- Check if the given Trie contains words starting from every alphabet
- Bottom-up traversal of a Trie
- Search in a trie Recursively

Given an array of n numbers, the task is to answer the following queries: maximumSubarraySum(start, end) : Find the maximum subarray sum in the range… Read More »

Sum Rule – If a task can be done in one of ways or one of ways, where none of the set of ways is… Read More »

A skew heap (or self – adjusting heap) is a heap data structure implemented as a binary tree. Skew heaps are advantageous because of their… Read More »

Given an array of n numbers, the task is to answer the following queries: kthSmallest(start, end, k) : Find the Kth smallest number in the… Read More »

Given a tree with N nodes and N-1 edges, find out the maximum height of tree when any node in the tree is considered as… Read More »

An unrolled linked list is a linked list of small arrays, all of the same size where each is so small that the insertion or… Read More »

Dynamic Programming(DP) is a technique to solve problems by breaking them down into overlapping sub-problems which follows the optimal substructure. There are various problems using… Read More »

Prerequisite: Basic Dynamic Programming, Bitmasks Consider the following problem where we will use Sum over subset Dynamic Programming to solve it. Given an array of… Read More »

In previous post i.e. Set 1 we have discussed that implements these below functions: insert(H, k): Inserts a key ‘k’ to Binomial Heap ‘H’. This… Read More »

Artificial intelligence is defined as study of rational agents. A rational agent could be anything which makes decisions, like a person, firm, machine, or software.… Read More »

Let us consider the following problem to understand Segment Trees. We have an array arr[0 . . . n-1]. We should be able to 1… Read More »

Consider an array A[] of integers and following two types of queries. update(l, r, x) : Adds x to all values from A[l] to A[r]… Read More »

Dope Vectors is a data structure that is used by compilers to store some metadata about the array like its total size, the size of… Read More »

Tries is a tree that stores strings. Maximum number of children of a node is equal to size of alphabet. Trie supports search, insert and… Read More »

Given an array of size n. Find the maximum sum an increasing subsequence. Examples: Input : arr[] = { 1, 20, 4, 2, 5 }… Read More »