## Maximum sum possible for a sub-sequence such that no two elements appear at a distance < K in the array

Given an array arr[] of n integers and an integer k, the task is to find the maximum sum possible for a sub-sequence such that… Read More »

- Check if a word exists in a grid or not
- Sum of XOR of all subarrays
- Minimum steps to reach any of the boundary edges of a matrix | Set 1
- Longest subsequence such that adjacent elements have at least one common digit
- Make Binary Search Tree
- Samsung Interview Experience through Co-cubes (2019)
- Minimum distance to the end of a grid from source
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Double Knapsack | Dynamic Programming
- Optimal Strategy for a Game | Set 2
- Minimum steps required to convert X to Y where a binary matrix represents the possible conversions
- Longest path in a directed Acyclic graph | Dynamic Programming
- A variation of Rat in a Maze : multiple steps or jumps allowed
- Find the number of distinct pairs of vertices which have a distance of exactly k in a tree
- Maximum subarray sum by flipping signs of at most K array elements
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Count of Numbers in Range where first digit is equal to last digit of the number
- Bellman Ford Algorithm (Simple Implementation)
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Find sub-matrix with the given sum
- Minimum steps to delete a string by deleting substring comprising of same characters
- Minimum cost to reach end of array array when a maximum jump of K index is allowed
- Count of sub-sets of size n with total element sum divisible by 3
- Count number of ways to reach a given score in a Matrix
- Maximum sum such that no two elements are adjacent | Set 2
- Sum of bitwise AND of all submatrices
- DP on Trees | Set-3 ( Diameter of N-ary Tree )
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Find the sum of the diagonal elements of the given N X N spiral matrix
- Number of Binary Strings of length N with K adjacent Set Bits

Given an array arr[] of n integers and an integer k, the task is to find the maximum sum possible for a sub-sequence such that… Read More »

Given an integer N(1<=N<=10^9). The task is to represent N as a sum of the maximum possible number of composite summands and print this maximum… Read More »

Given three integers R, B and W which denote the number of runs, balls and wickets. One can score 0, 1, 2, 3, 6 or… Read More »

Given an array arr[] of N integers and an integer K, one can move from an index i to any other j if j ≤… Read More »

Given three arrays A[], B[] and C[] of N integers. We can choose N elements from these array such that for every index i only… Read More »

Given a string str. You are allowed to delete only some contiguous characters if all the characters are same in a single operation. The task… Read More »

Given two integers N and K, the task is to count the number of ways to make a binary string of length N such that… 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 n, find count of n digit Stepping numbers. A number is called stepping number if all adjacent digits have an absolute difference of 1.… Read More »

Given an array arr[] of N integers and an integer X. Element arr[i] in array denotes the cost to use 2i. The task is to… Read More »

Given a directed graph G with N vertices and M edges. The task is to find the length of the longest directed path in Graph.… Read More »

Given a range [l, r], the task is to find the sum of all the even factors of the numbers from the given range. Examples:… Read More »

Given height and width of N rectangles. The task is to find the size of the largest subset such that no pair of rectangles fit… Read More »

Given that there are p people in a party. Each person can either join dance as a single individual or as a pair with any… Read More »

Given three numbers(x, y and z) which denote the number of people in the first group, the second group, and third group. We can form… Read More »