## Comparisons involved in Modified Quicksort Using Merge Sort Tree

In QuickSort, ideal situation is when median is always chosen as pivot as this results in minimum time. In this article, Merge Sort Tree is… Read More »

- Design a Chess Game
- Kth smallest element in a subarray
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Rearrange numbers in an array such that no two adjacent numbers are same
- Lazy Propagation in Segment Tree | Set 2
- Trie Data Structure using smart pointer and OOP in C++
- Range Queries to Find number of sub-arrays with a given xor
- Implement a Dictionary using Trie
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Persistent Trie | Set 1 (Introduction)
- Longest string in an array which matches with prefix of the given string
- Count of strings whose prefix match with the given string to a given length k
- Sort an array of strings based on the frequency of good words in them
- Introduction to R-tree
- Flipping Sign Problem | Lazy Propagation Segment Tree
- Queries to update a given index and find gcd in range
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- 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
- Gap Buffer Data Structure
- Find a pair from the given array with maximum nCr value
- Bottom-up traversal of a Trie
- B-Tree Insert without aggressive splitting
- Search in a trie Recursively
- Arrange array elements such that last digit of an element is equal to first digit of the next element
- Queries for number of distinct elements in a subarray | Set 2
- Strings from an array which are not prefix of any other string
- Index of kth set bit in a binary array with update queries
- Insertion in a Trie recursively
- B*-Trees implementation in C++

In QuickSort, ideal situation is when median is always chosen as pivot as this results in minimum time. In this article, Merge Sort Tree is… Read More »

Given an array of N numbers, the task is to answer Q queries of the following type:- query(start, end) = Number of times a number… Read More »

Given an array of n integers in non-decreasing order. Find the number of occurrences of the most frequent value within a given range. Examples: Input… Read More »

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 a study of rational agents. A rational agent could be anything which makes decisions, as a person, firm, machine, or… 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 »