## Score of Parentheses using Tree

Given a string str which contains pairs of balanced parentheses, the task is to calculate the score of the given string based on the given… 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
- Minimum cost of reducing Array by merging any adjacent elements repetitively
- Design a data structure that supports insert, delete, getRandom in O(1) with duplicates
- Design a Queue data structure to get minimum or maximum in O(1) time
- Difference between B tree and B+ tree
- Median of sliding window in an array | Set 2
- Finding shortest path between any two nodes using Floyd Warshall Algorithm
- Queries for elements having values within the range A to B in the given index range using Segment Tree
- 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
- Sum of prime numbers in range [L, R] from given Array for Q queries
- Maximum CPU Load from the given list of jobs
- Queries to check if any non-repeating element exists within range [L, R] of an Array
- Proof that traveling salesman problem is NP Hard
- Lexicographical smallest number after at most K consecutive swaps
- Sum and Maximum of elements in array from [L, R] before and after updates
- Range Sum and Update in Array : Segment Tree using Stack
- 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 Array elements greater than all elements on its left and at least K elements on its right
- Count of elements in an Array whose set bits are in a multiple of K

Given a string str which contains pairs of balanced parentheses, the task is to calculate the score of the given string based on the given… Read More »

Design a Data Structure that can support the following operations in O(1) Time Complexity. insert(x): Inserts x in the data structure. Returns True if x… Read More »

Problem: Design a Data Structure a SpecialQueue which supports following operations enque, deque, getMin() or getMax() where getMin() operation takes O(1) time. Example: Let the… Read More »

Given two arrays A[] and B[] containing N elements, the task is to find, for every element in the array B[], the element which is… Read More »

It is a binary tree that has following properties:- (1) Every key in the right sub-tree of a node is greater than the key stored… Read More »

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

Given an array arr of size N and Q queries of the form L, R and X, the task is to print the number of… Read More »

Data structure is a way of storing and organising data efficiently such that the required operations on them can be performed efficiently with respect to… Read More »

Given an array arr[] of N elements and an integer K, the task is to count all the elements whose number of set bits is… Read More »

Given a big string and an array of small strings, all of which are smaller in length than the big string. The task is to… 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 divisors of… Read More »

Given an array arr[] of N elements, the task is to answer Q queries each having two integers L and R. For each query, the… Read More »

Based on different properties such as speed, cost, and ease of use(as a developer), etc. the below information represents different ways of storing stuff in… Read More »

Given a set S with the initial element 0 that is S = { 0 }. The task is to perform each query when Q… Read More »

Given an array Arr of N integers and Q queries, each query having a range from L to R. Find the element having maximum digit… Read More »