GATE CSE · 2026 · CS2
Question 39: Algorithms
Give it a try, then reveal the answer to check your work.
Question 39
CS2MCQ2 marksNeeds review
Consider a table
, where the elements
,
, represent the cost of the optimal solutions of different subproblems of a problem that is being solved using a dynamic programming algorithm. The recursive formulation to compute the table entries is as follows:
Consider the following two algorithms to compute entries of
. Assume that for both the algorithms, for all
,
has been initialized to 1.Algorithm
: For
For
Algorithm
: For
For
For
If
Algorithm
,
is said to be correct if and only if it calculates the correct values of
, for all
, (as per the recursive formulation at the end of the execution of the algorithm
).Which one of the following statements is true?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerEXPLORE & PRACTISE
Paper and topic context
See where this question comes from and choose what to practise next.
2026CS2
GATE CSE 2026 · Paper 2
Computer Science and Information Technology · Original paper archive
- Section
- Section CS2
- Question type
- Multiple choice (MCQ)
- Marks
- 2 marks
Practise related topics
Explore more previous year questions using this question’s imported topic tags.
computer science
GATE CSE previous year questions
information technology
GATE CSE previous year questions
computing
GATE CSE previous year questions
algorithms
GATE CSE previous year questions
dynamic programming
GATE CSE previous year questions
Comments
Ask a question, share your approach, or help someone understand.
Log in to view the discussion
You’re not logged in. Log in or create an account to see discussions and add comments.