Here is the collection of the Top 50 list of frequently asked interviews question on Dynamic Programming. Problems in this Article are divided into three… Read More

# Category Archives: Dynamic Programming

Given a positive integer K and a matrix arr[][] of dimensions N*M consisting of integers, the task is to find the maximum sum of K… Read More

Given a positive integer N, the task is to count the number of N-digit numbers which contain all single digit primes. Examples: Input: N =… Read More

Given a positive integer N, the task is to find the minimum number of operations needed to convert N to 2 either by decrementing N… Read More

Given a positive integer N, the task is to find the number of ways to fill the board of dimension 2*N with a tile of… Read More

Rahul and Ankit are the only two waiters in Royal Restaurant. Today, the restaurant received N orders. The amount of tips may differ when handled… Read More

Given a positive integer N, the task is to count the number of N-digit numbers whose sum of digits is a prime number. Examples: Input:… Read More

Given two integers N and M where N is the number of boxes placed in a row and M is the number of colours of… Read More

Given a positive integer N, the task is to count the number of N-digit numbers such that the count of distinct odd and distinct even… Read More

Given an integer W, arrays val[] and wt[], where val[i] and wt[i] are the values and weights of the ith item, the task is to… Read More

Given a positive integer N, the task is to find the number of binary strings of length N that are repeated concatenation of only one… Read More

Given a positive integer N, the task is to find the number of all N-digit numbers whose adjacent digits have equal Greatest Common Divisor(GCD). Examples:… Read More

Given a positive integer N, the task is to count the number of N-digit numbers such that every index (1-based indexing) in the number is… Read More

Given an array arr[] of positive integers representing prices of stocks and an integer transactionFee, the task is to find the maximum profit possible after… Read More