## Maximum average sum partition of an array

Given an array, we partition a row of numbers A into at most K adjacent (non-empty) groups, then the score is the sum of the… Read More »

- Check if a word exists in a grid or not
- Minimum steps to reach any of the boundary edges of a matrix | Set 1
- Sum of XOR of all subarrays
- Count ways to reach a score using 1 and 2 with no consecutive 2s
- Make Binary Search Tree
- Treasure and Cities
- Number of ways to partition a string into two balanced subsequences
- Memoization using decorators in Python
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Jump Pointer Algorithm
- Minimum distance to the end of a grid from source
- Minimum steps required to convert X to Y where a binary matrix represents the possible conversions
- Minimum cost to reach a point N from 0 with two different operations allowed
- A variation of Rat in a Maze : multiple steps or jumps allowed
- Count of Numbers in Range where first digit is equal to last digit of the number
- Count of sub-sets of size n with total element sum divisible by 3
- Minimum sum falling path in a NxN grid
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Ways to place K bishops on an N×N chessboard so that no two attack
- Find sub-matrix with the given sum
- Number of Binary Strings of length N with K adjacent Set Bits
- Find the sum of first N odd Fibonacci numbers
- Minimum Operations to make value of all vertices of the tree Zero
- Number of balanced bracket expressions that can be formed from a string
- Minimum number of operations required to sum to binary string S
- Count of Numbers in a Range where digit d occurs exactly K times
- Count pairs (A, B) such that A has X and B has Y number of set bits and A+B = C
- Count the number of special permutations
- Count of Numbers in Range where the number does not contain more than K non zero digits
- Number of Paths of Weight W in a K-ary tree

Given an array, we partition a row of numbers A into at most K adjacent (non-empty) groups, then the score is the sum of the… Read More »

Given an array of n positive integers, write a program to find the maximum sum of increasing subsequence from prefix till i-th index and also… Read More »

Given n arrays of different length consisting of integers, the target is to pick atmost one subarray from an array such that the combined length… Read More »

Given a matrix (or 2D array) a[][] of integers, find prefix sum matrix for it. Let prefix sum matrix be psa[][]. The value of psa[i][j]… Read More »

Given a text and a wildcard pattern, find if wildcard pattern is matched with text. The matching should cover the entire text (not partial text).… Read More »

Given an array of integers, a number and a maximum value, task is to compute the maximum value that can be obtained from the array… Read More »

A Multistage graph is a directed graph in which the nodes can be divided into a set of stages such that all edges are from… Read More »

Given an integer ‘n’, print the first ‘n’ terms of the Moser-de Bruijn Sequence. The Moser-de Bruijn sequence is the sequence obtained by adding up… Read More »

Given two strings ‘X’ and ‘Y’, find the length of longest common substring. Expected space complexity is linear. Examples : Input : X = “GeeksforGeeks”,… Read More »

Given an array of A of n integers and an array B of m integers find the Maximum Contiguous Subarray Sum of array A such… Read More »

Given a triangular structure of numbers, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the… Read More »

An array is given, find length of the subarray having maximum sum. Examples : Input : a[] = {1, -2, 1, 1, -2, 1} Output… Read More »

Given a string S, we need to write a program to check if it is possible to construct the given string S by performing any… Read More »

Given an array that contains both positive and negative integers, find the product of the maximum product subarray. Expected Time complexity is O(n) and only… Read More »

Given an array arr[]. Determine whether it is possible to split the array into two sets such that the sum of elements in both the… Read More »