Algorithms · Dynamic Programming
Official IIT answer key · IIT Kharagpur · Audited Aug 2026
GATE CSE 2014 Set 2 Q37 · NAT · 2 marks
Key concept
No account needed
Sit 5 related Dynamic ProgrammingPYQs as a guest. We'll score the set and show which traps cost marks — sign in only if you want to save the run.
Topic notes
Dynamic Programming in GATE CS tests both classical tabular algorithms (such as Matrix Chain Multiplication and Rod Cutting) and structural properties of DP (such as dependency graphs, evaluation orders, and state-space reductions). Questions frequently require either manual tracing of a DP table on small concrete inputs or mapping an unfamiliar problem reduction (like array replacement distance) to a standard DP formulation like Longest Non-Decreasing Subsequence. Both conceptual evaluation order questions (MCQ/MSQ) and exact numerical optimization outputs (NAT) are regularly tested.
Full Dynamic Programming guide →Consider two strings A = "qpqrr" and B = "pqrqrp". Let x be the length of the longest common subsequence (not necessarily contiguous) between A and B and let y be the number of such longest common subsequences between A and B. Then x + 10y = 1cm.
Topic-wise GATE CS PYQs with verified steps
Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.
