Dynamic Programming Interview Questions and Answers
The Best LIVE Mock Interview - You should go through before Interview
Freshers / Beginner level questions & answers
Ques 1. Fibonacci Series
The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones.
Example:
Fib(0) = 0, Fib(1) = 1, Fib(n) = Fib(n-1) + Fib(n-2)
Is it helpful?
Add Comment
View Comments
Ques 2. Maximum Subarray Sum
Find the contiguous subarray with the largest sum.
Example:
Input: [-2, 1, -3, 4, -1, 2, 1, -5, 4], Output: 6 (subarray [4, -1, 2, 1])
Is it helpful?
Add Comment
View Comments
Ques 3. Unique Paths
A robot is located at the top-left corner of a m x n grid. It can only move either down or right. Find the number of unique paths to reach the bottom-right corner.
Example:
Input: m = 3, n = 7, Output: 28
Is it helpful?
Add Comment
View Comments
Most helpful rated by users: