Count of all sub-strings with sum of weights at most K
Given a string S consisting of small English letters and a string W consisting of weight of all characters of English alphabet where for all… Read More »
Given a string S consisting of small English letters and a string W consisting of weight of all characters of English alphabet where for all… Read More »
Given an integer M which represents an array initially having numbers 1 to M. Also given is a Query array. For every query, search the… Read More »
The Count-min sketch is a probabilistic data structure. The Count-Min sketch is a simple technique to summarize large amounts of frequency data. Count-min sketch algorithm… Read More »
A trie is a tree-like information retrieval data structure whose nodes store the letters of an alphabet. It is also known as a digital tree… Read More »
Prerequisites: Segment Tree Given a number N which represents the size of the array initialized to 0 and Q queries to process where there are… Read More »
Prerequisite: Segment Trees Given a binary array arr[] consisting of only 0’s and 1’s and a 2D array Q[][] consisting of K queries, the task… Read More »
Given an array arr[] of size N and a set Q[][] containing M queries, the task is to execute the queries on the given array… Read More »
Given a string P consisting of small English letters and a string Q consisting of weight of all characters of English alphabet such that for… Read More »
Given an array of jobs with different time requirements, where each job consists of start time, end time and CPU load. The task is to… Read More »
Given an array arr[] of N integers. The task is to do the following operations: Add a value X to all the element from from… Read More »
Given Adjacency List representation of a tree and an integer K., the task is to find whether the given tree can be split into K… Read More »
Given an array arr[] of N integers. The task is to find the number of inversion. Two elements arr[i] and arr[j] form an inversion if… Read More »
Prerequisites: Bellman-Ford Algorithm Given a directed weighted graph with V vertices, E edges and a source vertex S. The task is to find the shortest… Read More »
In computability theory, the Ackermann function, named after Wilhelm Ackermann, is one of the simplest and earliest-discovered examples of a total computable function that is… Read More »
Prerequisite: Trie Given a list of string str[] and a prefix string pre. The task is to count the number of words in list of… Read More »