## Count of strings whose prefix match with the given string to a given length k

Given an array of strings arr[] and given some queries where each query consists of a string str and an integer k. The task is… Read More »

- Fibonacci Heap - Insertion and Union
- Sort the array of strings according to alphabetical order defined by another string
- Some Basic Theorems on Trees
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Number of subarrays have bitwise OR >= K
- Counting inversions in an array using segment tree
- Count of words that are present in all the given sentences
- Range Sum Queries and Update with Square Root
- Optimal sequence for AVL tree insertion (without any rotations)
- Count pairs (A, B) such that A has X and B has Y number of set bits and A+B = C
- Range and Update Sum Queries with Factorial
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Range Queries to Find number of sub-arrays with a given xor
- Range queries to count 1s in a subarray after flip operations
- Queries for Composite numbers in subarray (With Point Updates)
- Program to implement Run Length Encoding using Linked Lists
- Lazy Propagation in Segment Tree | Set 2
- Find a pair from the given array with maximum nCr value
- Find triplet such that number of nodes connecting these triplets is maximum
- Queries to update a given index and find gcd in range
- Introduction to R-tree
- Count of strings whose prefix match with the given string to a given length k

Given an array of strings arr[] and given some queries where each query consists of a string str and an integer k. The task is… Read More »

Given an array arr[] of N integers and queries Q. Queries are of two types: Update a given index ind by X. Find the gcd… Read More »

R-tree is a tree data structure used for storing spatial data indexes in an efficient manner. R-trees are highly useful for spatial data queries and… Read More »

Given a Tree with N nodes, the task is to find a triplet of nodes (a, b, c) such that the number of nodes covered… Read More »

Given an array arr[] of size n and q queries and an integer k. Each query consists of an index range [l, r] and the… Read More »

Given an array arr[] of size N. There are two types of operations: Update(l, r, x) : Increment the a[i] (l <= i <= r)… Read More »

Given an unsorted array arr[] of n integers and an integer k, the task is to find the kth largest element in the given index… Read More »

Given an array arr[] of n positive integers. The task is to find elements arr[i] and arr[j] from the array such that arr[i]Carr[j] is maximum… Read More »

Given an unsorted array, trim the array such that twice of minimum is greater than the maximum in the trimmed array. Elements should be removed… Read More »

Given n sentences. The task is to count the number of words that appear in all of these sentences. Note that every word consists of… Read More »

Given a Linked List as the input. The task is to encode the given linked list using Run Length Encoding. That is, to replace a… Read More »

Given an array arr[] and an integer K, the task is to count the number of sub-arrays having bitwise OR ≥ K. Examples: Input: arr[]… Read More »

Given an array of N integers, the task is to perform the following two operations on the given array: query(start, end) : Print the number… Read More »

Given a string str and an array of strings strArr[], the task is to sort the array according to the alphabetical order defined by str.… Read More »

Given an array arr[] of N integers and number of queries Q. The task is to answer three types of queries. Update [l, r] –… Read More »