## Number of ways to reach the end of matrix with non-zero AND value

Given an N * N matrix arr[][] consisting of non-negative integers, the task is to find the number of ways to reach arr[N – 1][N… Read More »

- Optimal Strategy for a Game | Set 2
- Samsung Interview Experience through Co-cubes (2019)
- Maximum sum such that no two elements are adjacent | Set 2
- Longest subsequence such that adjacent elements have at least one common digit
- Bellman Ford Algorithm (Simple Implementation)
- Double Knapsack | Dynamic Programming
- Coin Change | BFS Approach
- Minimum time required to rot all oranges | Dynamic Programming
- Partition an array of non-negative integers into two subsets such that average of both the subsets is equal
- Longest path in a directed Acyclic graph | Dynamic Programming
- Minimum number of cubes whose sum equals to given number N
- Maximum sum combination from two arrays
- Count of integers of length N and value less than K such that they contain digits only from the given set
- LCA in a tree using Binary Lifting Technique
- Minimum cost to reach end of array array when a maximum jump of K index is allowed
- Maximize the happiness of the groups on the Trip
- Count number of ways to reach a given score in a Matrix
- Maximum Sum Subsequence of length k
- Maximum sum path in a matrix from top to bottom and back
- Number of subsets with zero sum
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Maximum subarray sum by flipping signs of at most K array elements
- Greedy approach vs Dynamic programming
- Iterative approach to print all permutations of an Array
- Divide the array in K segments such that the sum of minimums is maximized
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Minimum steps to delete a string by deleting substring comprising of same characters
- Number of ways to choose elements from the array such that their average is K

Given an N * N matrix arr[][] consisting of non-negative integers, the task is to find the number of ways to reach arr[N – 1][N… 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 »

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

Problem statement: Consider a row of n coins of values v1 . . . vn, where n is even. We play a game against an… Read More »

Given a binary string str. The task is to find the smallest positive integer C such that the binary string can be cut into C… Read More »

Given a matrix of dimension N * M. The task is find the maximum sum of path from arr[0][0] to arr[N – 1][M – 1]… Read More »

We have introduced Bellman Ford and discussed on implementation here. Input: Graph and a source vertex src Output: Shortest distance to all vertices from src.… Read More »

Given an array arr[] of size N, the task is to count the number of ways we can select a subset from the given array… Read More »

Given an integer n, the task is to find the minimum number of cubes whose sum equals to N. Examples: Input: N = 496 Output:… Read More »

Given an array arr[] of N integers and an integer X. We can choose any sub-array and multiply all its element by X. After multiplication,… Read More »

Given an array arr[] of integers, the task is to find the minimum number greater than the maximum element from the array which cannot be… Read More »

Given a string S. The task is to count the non-overlapping pairs of palindromic sub-strings S1 and S2 such that the strings should be S1[L1…R1]… Read More »

Given a string str and Q queries. Every query consists of two numbers L and R. The task is to print if the sub-string[L…R] is… Read More »

Given an array arr[] of size N. The task is to find the length of the longest subsequence from the given array such that the… Read More »

Given an integer N. The task is to find the number of all possible distinct binary strings of length N which have at least 3… Read More »