## Minimum cost of reducing Array by merging any adjacent elements repetitively

Given an array arr[] of N numbers. We can merge two adjacent numbers into one and the cost of merging the two numbers is equal… Read More »

- Shortest Path Faster Algorithm
- Count the number of words with given prefix using Trie
- Check if given words are present in a string
- How Coronavirus outbreak can end | Visualize using Data structures
- Design a data structure that supports insert, delete, getRandom in O(1) with duplicates
- Minimum cost of reducing Array by merging any adjacent elements repetitively
- Design a Queue data structure to get minimum or maximum in O(1) time
- Difference between B tree and B+ tree
- Queries for elements having values within the range A to B in the given index range using Segment Tree
- Median of sliding window in an array | Set 2
- Finding shortest path between any two nodes using Floyd Warshall Algorithm
- Ackermann Function
- Paranthesis Theorem
- XOR of elements in a given range with updates using Fenwick Tree
- Types of Tries
- Dynamic Segment Trees : Online Queries for Range Sum with Point Updates
- Maximum CPU Load from the given list of jobs
- Build a segment tree for N-ary rooted tree
- Queries to check if any non-repeating element exists within range [L, R] of an Array
- Proof that traveling salesman problem is NP Hard
- Sum and Maximum of elements in array from [L, R] before and after updates
- Lexicographical smallest number after at most K consecutive swaps
- Range Sum and Update in Array : Segment Tree using Stack
- Sum of prime numbers in range [L, R] from given Array for Q queries
- Query to find the maximum and minimum weight between two nodes in the given tree using LCA.
- Find K-th smallest element in an array for multiple queries
- Counting Inversions using Ordered Set and GNU C++ PBDS
- Static and Dynamic data structures in Java with Examples
- Check if a Tree can be split into K equal connected components
- Count of elements in an Array whose set bits are in a multiple of K

Given an array arr[] of N numbers. We can merge two adjacent numbers into one and the cost of merging the two numbers is equal… Read More »

Given a graph and two nodes u and v, the task is to print the shortest path between u and v using the Floyd Warshall… Read More »

Given two N-ary trees having M nodes each. Also, given their edges and their roots respectively. The task is to check if they are isomorphic… Read More »

Given a non-cyclic graph having V nodes and E edges and a source node S, the task is to calculate the sum of the minimum… Read More »

Given an array arr[] of size N and Q queries of the form [L, R], the task is to find the number of distinct values… Read More »

Binary Space Partitioning is implemented for recursively subdividing a space into two convex sets by using hyperplanes as partitions. This process of subdividing gives rise… Read More »

Given a set of strings S and a string patt the task is to autocomplete the string patt to strings from S that have patt… Read More »

Given an array arr[] of size N, the task is to find the number of times the array can be partitioned repetitively into two subarrays… Read More »

Given an array arr[] of N positive integers and two positive integers S and K, the task is to reach the position of the array… Read More »

Given an array arr[], the task is to count the number of the unique arrays can be formed by updating the elements of the given… Read More »

Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More »

Given a set of strings str, the task is to print all the joints of the Trie constructed from the given set of strings. Joints… Read More »

Double Threaded Binary Search Tree: is a binary search tree in which the nodes are not every left NULL pointer points to its inorder predecessor… Read More »

Given a set of strings S and a string P, the task is to print all strings from the set with suffix P. Examples: Input:… Read More »

Pre-requisite: Policy based data structure Given an array arr[], the task is to find the number of inversions for each element of the array. Inversion… Read More »