## Find maximum XOR of given integer in a stream of integers

You are given a number of queries Q and each query will be of the following types: Query 1 : add(x) This means add x… Read More »

- Sort the array of strings according to alphabetical order defined by another string
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Number of subarrays have bitwise OR >= K
- Count of words that are present in all the given sentences
- Count of strings whose prefix match with the given string to a given length k
- 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
- Range Queries to Find number of sub-arrays with a given xor
- Persistent Trie | Set 1 (Introduction)
- Longest string in an array which matches with prefix of the given string
- Program to implement Run Length Encoding using Linked Lists
- Introduction to R-tree
- Queries for Composite numbers in subarray (With Point Updates)
- Queries to update a given index and find gcd in range
- Find triplet such that number of nodes connecting these triplets is maximum
- Rearrange numbers in an array such that no two adjacent numbers are same
- Find a pair from the given array with maximum nCr value
- B-Tree Insert without aggressive splitting
- Find the number of different numbers in the array after applying the given operation q times
- 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

You are given a number of queries Q and each query will be of the following types: Query 1 : add(x) This means add x… Read More »

Quadtrees are an effective method to store and locate data of points in a two-dimensional plane. Another effective use of quadtrees is in the field… Read More »

Given a array ‘a[]’ of size n and number of queries q. Each query can be represented by two integers l and r. Your task… Read More »

Given an array ‘a[]’ and number of queries q there will be two type of queries Query 0 update(i, v) : Two integers i and… Read More »

We have an array arr[0 . . . n-1]. There are two type of queries Find the XOR of elements from index l to r… Read More »

Given an array where each element is a vector containing integers in sorted order. The task is to answer following queries: count(start, end, k) :… Read More »

It is recommended to refer following post as prerequisite of this post. Splay Tree | Set 1 (Search) Following are the different cases to delete… Read More »

Quadtrees are trees used to efficiently store data of points on a two-dimensional space. In this tree, each node has at most four children. We… Read More »

Given an array ‘a[]’ and number of queries q. Each query can be represented by l, r, x. Your task is to print the number… Read More »

We are given a Trie with a set of strings stored in it. Now the user types in a prefix of his search query, we… Read More »

Dynamic connectivity is a data structure that dynamically maintains the information about thee connected components of graph. In simple words suppose there is a graph… Read More »

We are given 2*N – 1 integers. We need to check whether it is possible to construct a Range Minimum Query segment tree for an… Read More »

One of the most common operations on strings is appending or concatenation. Appending to the end of a string when the string is stored in… Read More »

An n-ary tree in computer science is a collection of nodes normally represented hierarchically in the following fashion. The tree starts at the root node.… Read More »

We are given an array of integers and a range, we need to find whether the subarray which falls in this range has values in… Read More »