
Learn core concepts, essential formulas, and attempt practice questions designed on the latest TCS NQT testing patterns.
What is the difference between Memoization and Tabulation?
Correct Answer: A) Memoization is Top-Down; Tabulation is Bottom-Up
Step-by-step Solution: Memoization caches recursive call results (Top-Down). Tabulation builds lookup tables iteratively (Bottom-Up).
In 0/1 Knapsack, can we take fractional parts of items?
Correct Answer: A) No, items must be chosen completely or skipped
Step-by-step Solution: The '0/1' name indicates binary choices: either include the item completely (1) or skip it (0).
Write down the DP state transition formula before writing code loops.