## Print the Maximum Subarray Sum

Given an array arr[], the task is to find the elements of a contiguous subarray of numbers which has the largest sum. Examples: Input: arr… Read More »

- Maximum of all distances to the nearest 1 cell from any 0 cell in a Binary matrix
- Print the Maximum Subarray Sum
- Count of Binary strings of length N having atmost M consecutive 1s or 0s alternatively exactly K times
- Minimum steps to convert all top left to bottom right paths in Matrix as palindrome | Set 2
- Largest subsequence such that all indices and all values are multiples individually

Given an array arr[], the task is to find the elements of a contiguous subarray of numbers which has the largest sum. Examples: Input: arr… Read More »

Given a matrix mat[][] with N rows and M columns. The task is to find the minimum number of changes required in the matrix such… Read More »

Given an array arr[] of N positive integers, the task is to find the largest strictly increasing subsequence of arr[] such that the indices of… Read More »

Given three integers, N, K and M. The task is to find out the number of binary strings of length N which always starts with… Read More »

Given a Matrix of size N*N filled with 1‘s and 0‘s, the task is to find the maximum distance from a 0-cell to its nearest… Read More »

A string is called good if it is made with only digits 0 to 9 and adjacent elements are different. The task is to find… Read More »

Given an array arr[] and an integer K, the task is to find out the minimum product of a subsequence where adjacent elements of the… Read More »

Given a N X N matrix consisting of characters. Also given are Q queries, where each query contains a co-ordinate (X, Y). For every query,… Read More »

Given an integer N, the task is to find an aggregate sum of all integer partitions of this number such that each partition does not… Read More »

Given two jugs with the maximum capacity of m and n liters respectively. The jugs don’t have markings on them which can help us to… Read More »

Given a Directed Acyclic Graph with n vertices and m edges. The task is to find the number of different paths that exist from a… Read More »

The tetranacci numbers are a generalization of the Fibonacci numbers defined by the recurrence relation T(n) = T(n-1) + T(n-2) + T(n-3) + T(n-4) with… Read More »

In number theory, a weird number is a natural number that is abundant but not semiperfect. In other words, the sum of the proper divisors… Read More »

Given N number of stairs. Also given the number of steps that one can cover at most in one leap (K). The task is to… Read More »

Given two numbers N and K. Find the number of ways to represent N as the sum of K Fibonacci numbers. Examples: Input : n… Read More »