GATE Algorithms: Dynamic Programming – Previous Year Questions
5 GATE previous year questions on Dynamic Programming (Algorithms, Computer Science) with answers and explanations, from every paper.
- GATE 2018 CS Q41 – Assume that multiplying a matrix G 1 of dimension p q with another matrix G 2 of dimension q r requires pqr scalar multiplications. Computing the…
- GATE 2026 CS (CS2) Q39 – Consider a table T where the entries T[i][j], 0 i,j n, represent costs of subproblems in a dynamic programming algorithm. The recursive formulation is…
- GATE 2024 CS (CS2) Q35 – Let A be an array containing integer values. The distance of A is defined as the minimum number of elements in A that must be replaced with another…
- GATE 2024 CS (CS2) Q42 – Consider an array X of n positive integers. The C code below computes the length of the longest subarray of X containing at most two distinct…
- GATE 2021 CS Q50 – Define R n to be the maximum amount earned by cutting a rod of length n meters into one or more pieces of integer length and selling them. For i>0,…