## Expected number of moves to reach the end of a board | Matrix Exponentiation

Given a linear board of length N numbered from 1 to N, the task is to find the expected number of moves required to reach… Read More »

- Largest Square in a Binary Matrix with at most K 1s for multiple Queries
- Check if a string is a scrambled form of another string
- Median of an unsorted array using Quick Select Algorithm
- Minimum cost of reducing Array by merging any adjacent elements repetitively
- Check if a given number is a Perfect square using Binary Search
- Minimum window size containing atleast P primes in every window of given range
- Find Second largest element in an array | Set 2
- Longest subarray having sum K | Set 2
- Queries to check if any non-repeating element exists within range [L, R] of an Array
- Queries to find the Minimum Weight from a Subtree of atmost D-distant Nodes from Node X
- Range Queries for number of Armstrong numbers in an array with updates
- Array Range Queries to find the Maximum Armstrong number with updates
- Count number of pairs with the given Comparator
- Split a Numeric String into Fibonacci Sequence
- Minimum capacity of small arrays needed to contain all element of the given array
- Largest substring where all characters appear at least K times | Set 2
- Frequency of an integer in the given array using Divide and Conquer
- Split a given array into K subarrays minimizing the difference between their maximum and minimum
- Find the element having maximum set bits in the given range for Q queries
- Fast Doubling method to find the Nth Fibonacci number
- Array range queries to find the number of perfect square elements with updates
- Calculate weight of parenthesis based on the given conditions
- Check if given Binary string follows then given condition or not
- How to implement text Auto-complete feature using Ternary Search Tree
- Minimum value of K such that sum of cubes of first K natural number is greater than equal to N
- Quick Sort using Multi-threading
- Range Queries to count the number of even parity values with updates
- Least root of given quadratic equation for value greater than equal to K
- Array range queries to find the maximum Fibonacci number with updates
- Range Update Queries to XOR with 1 in a Binary Array.

Given a linear board of length N numbered from 1 to N, the task is to find the expected number of moves required to reach… Read More »

Given an array cell[] of N elements, which represent the positions of the cells in a prison. Also, given an integer P which is the… Read More »

Given an infinite matrix filled with the natural numbers as shown below: 1 2 4 7 . . . 3 5 8 . . .… Read More »

Given an array of size N containing numbers only from 0 to 63, and you are asked Q queries regarding it. Queries are as follows:… Read More »

Given an array arr[], the task is to find the smallest sub-arrays with GCD equal to 1. If there is no such sub-array then print… Read More »

Given an array arr[], the task is to finds the total significant inversion count for the array. Two elements arr[i] and arr[j] form a significant… Read More »

Given an integer N which is a multiple of 4, the task is to find an N x N grid for which the bitwise xor… Read More »

Given four integers A, B, K, M. The task is to find (A + iB)K % M which is a complex number too. A +… Read More »

The standard Tower of Hanoi problem is explained here . In the standard problem, all the disc transactions are considered identical. Given a 3×3 matrix… Read More »

Given an in-order traversal of a cartesian tree, the task is to build the entire tree from it. Examples: Input: arr[] = {1, 5, 3}… Read More »

Given an array arr[] of size N and an integer K, the task is to find the Kth smallest element from the array in constant… Read More »

Complexities like O(1) and O(n) are simple to understand. O(1) means it requires constant time to perform operations like to reach an element in constant… Read More »

Given an array arr[] of length N, the task is to find the sum of the maximum elements of every possible sub-array of the array.… Read More »

Given three array A[], B[] and C[] of N integers each. The task is to find the count of triplets (A[i], B[j], C[k]) such that… Read More »

Given a 2d-matrix consisting of positive integers, the task is to find the minimum number of steps required to reach the end of the matrix.… Read More »