Disclaimer:
Educational Use Only:
The website links provided are to be used strictly for educational and knowledge-gaining purposes only.
No Misuse:
Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.
Respect for Websites and Businesses:
Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.
Acknowledge Value of Knowledge:
Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.
No Endorsement:
The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.
User Responsibility:
By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.
Overall MCQs for Reference
- Which of the following is a property of a dynamic programming problem?
a. Greedy approach
b. Divide and conquer
c. Memoization only
d. Both optimal substructure and overlapping subproblems
Answer: dsanfoundry+1 - What does optimal substructure mean in dynamic programming?
a. Problem can be divided into non-overlapping subproblems
b. Solution can be constructed efficiently using brute force
c. Optimal solution can be constructed from optimal solutions to its subproblems
d. Problems have no subproblems
Answer: calooba+1 - Which property implies that subproblems overlap and are solved many times in the process?
a. Unique solutions
b. Overlapping subproblems
c. Divisible subparts
d. Greedy substructure
Answer: bsanfoundry+1 - What is the main advantage of dynamic programming over naive recursion?
a. Lower memory usage
b. Avoids storing results
c. Avoids redundant calculations by memoization or tabulation
d. Uses randomization
Answer: cgeeksforgeeks+1 - Which of these is NOT typically solved using dynamic programming?
a. Longest common subsequence
b. Fibonacci sequence
c. Factorial computation
d. Sorting arrays
Answer: dexamveda+1 - Memoization in dynamic programming refers to:
a. Writing code iteratively
b. Caching solutions to subproblems
c. Using randomization
d. Not storing any solution
Answer: balooba+1 - Tabulation in dynamic programming is also known as:
a. Top-down approach
b. Recursive approach
c. Bottom-up approach
d. Brute force
Answer: cgeeksforgeeks+1 - The time complexity of naive recursive Fibonacci calculation is:
a. O(1)
b. O(n)
c. O(n^2)
d. O(2^n)
Answer: dexamveda - For the Knapsack problem, which technique makes dynamic programming efficient?
a. Storing intermediate results in a table
b. Random permutation
c. Using only recursion
d. Binary search
Answer: ageeksforgeeks+1 - Dynamic programming differs from greedy algorithms because:
a. Greedy algorithms give only approximate answers
b. DP saves intermediate results and checks multiple subproblem combinations
c. DP is always slower
d. Greedy is always correct
Answer: bsanfoundry+1 - In dynamic programming, what does the term “state” represent?
a. Only the final answer
b. The complete set of all possible variables at a step
c. The sequence length
d. Number of recursions
Answer: bscribd+1 - In machine learning, dynamic programming is often used in:
a. Training neural networks
b. Optimization problems like sequence alignment
c. Hardware accelerator design
d. Simple arithmetic
Answer: bdiptisurvase.wordpress+1 - Which machine learning approach uses dynamic programming for policy evaluation and control?
a. Supervised Learning
b. Unsupervised Learning
c. Reinforcement Learning
d. Clustering
Answer: cstudocu+1 - In reinforcement learning, which are considered problem-solving methods?
a. Dynamic programming only
b. Monte Carlo methods only
c. Temporal-difference learning only
d. All of these
Answer: ddiptisurvase.wordpress+1 - What is the Bellman equation primarily used for in dynamic programming?
a. Calculating derivatives
b. Defining recursive relationships for value functions
c. Memory deallocation
d. Generating random numbers
Answer: bcp-algorithms+1 - A DP problem with a large number of states may run into which limitation?
a. Lack of optimal substructure
b. Memory constraints
c. Too few subproblems
d. Overfitting
Answer: balooba - What does the “curse of dimensionality” refer to in the context of dynamic programming?
a. Large recursion depths
b. Exponential growth in required memory and computation as state space increases
c. Incomplete convergence
d. Underfitting data
Answer: balooba - Which of these is a classic algorithm that uses dynamic programming?
a. Dijkstra’s algorithm
b. QuickSort
c. Viterbi algorithm
d. Binary Search
Answer: cgeeksforgeeks+1 - In dynamic programming, the approach where recursion is combined with memory/storage is called:
a. Memoization
b. Brute force
c. Greedy selection
d. Random sampling
Answer: ageeksforgeeks+1 - Which of the following problems is NOT typically solved with dynamic programming?
a. Shortest path in a weighted DAG
b. Graph cycle detection
c. Matrix chain multiplication
d. Longest increasing subsequence
Answer: bgeeksforgeeks+1 - The “edit distance” problem between two strings is best solved by:
a. Hashing
b. Recursion with memoization
c. Dynamic programming tabulation
d. Heap sorting
Answer: cgeeksforgeeks+1 - Which characteristic distinguishes DP problems from divide and conquer?
a. No overlapping subproblems in divide and conquer
b. Both solve with memoization
c. DP is always faster
d. Divide and conquer requires tabulation
Answer: aalooba - The DP table for LCS (Longest Common Subsequence) between two strings of length m and n has size:
a. m x n
b. m + n
c. max(m, n)
d. 2^n
Answer: ageeksforgeeks+1 - In “top-down” dynamic programming, base cases are handled by:
a. Skipping recursion
b. Not initializing any entries
c. Pre-filling the memo table
d. Explicit return statements for trivial inputs
Answer: dfaculty.gwu+1 - A state transition function in DP:
a. Returns only true or false
b. Describes how current decisions affect state at each step
c. Must always be linear
d. Is not necessary
Answer: balooba+1 - Why is dynamic programming useful for resource allocation?
a. It tries all combinations
b. It finds optimal allocation by solving subproblems and reusing results
c. It ignores constraints
d. It memoizes final output only
Answer: balooba - Which of these is NOT a typical application area of dynamic programming in ML?
a. Hidden Markov Models (HMMs)
b. Sequence alignment in bioinformatics
c. Decision tree learning
d. Speech recognition
Answer: cgeeksforgeeks+1 - The complexity of DP solution for the subset sum problem with n numbers and sum S is:
a. O(n)
b. O(S)
c. O(n × S)
d. O(2^n)
Answer: cgeeksforgeeks+1 - What is the core reason to use dynamic programming in Markov Decision Processes (MDPs)?
a. Randomization
b. Breaking problem into overlapping optimal subproblems for value and policy iteration
c. Linear programming
d. Feature extraction
Answer: bcp-algorithms+1 - The time complexity of tabulated Fibonacci sequence with n steps is:
a. O(n^2)
b. O(1)
c. O(n)
d. O(2^n)
Answer: cgeeksforgeeks+1 - What role does the DP “recurrence relation” play?
a. Computes random outputs
b. Establishes the relationship between a problem and its subproblems
c. Fills array with random values
d. Handles errors
Answer: balooba - Which component is essential for defining a DP solution?
a. Only input size
b. A well-defined state and recurrence
c. Output formatting
d. Binary search algorithm
Answer: balooba - The principle of optimality states that:
a. Every subproblem’s solution must be used
b. An optimal solution to the problem contains optimal solutions to subproblems
c. All elements must participate in subproblems
d. Problems must be independent
Answer: bsanfoundry+1 - Which is an example of tabulation order for DP?
a. Recursive backtracking
b. Filling table from base cases upwards
c. Random entry fill
d. Depth first search
Answer: bfaculty.gwu+1 - The DP technique for minimizing multiplications in matrix chain multiplication is based on:
a. Storing split points and minimum cost for submatrices
b. Using brute force trial
c. A single recursive branch
d. Using greedy split
Answer: asanfoundry+1 - What is the space complexity of the standard DP solution for the coin change problem (n coins, value V)?
a. O(1)
b. O(V)
c. O(n)
d. O(n × V)
Answer: dgeeksforgeeks+1 - Which is TRUE about dynamic programming implementation in ML libraries like TensorFlow and PyTorch?
a. Not supported in ML libraries
b. Used implicitly in sequence modeling and RL algorithms
c. Only for unsupervised learning
d. Requires brute force methods
Answer: balooba - The Viterbi algorithm is used for:
a. Object detection
b. Speech recognition with HMMs using DP
c. Decision trees
d. Matrix inversion
Answer: bgeeksforgeeks+1 - Which dynamic programming method is most memory-efficient?
a. Tabulation with full DP table
b. Storing only required subproblem values at each step (space optimization)
c. Recursion with no memoization
d. Storing all results twice
Answer: bgeeksforgeeks+1 - Which is a disadvantage of dynamic programming?
a. Cannot handle overlapping subproblems
b. Uses excessive memory for large state spaces
c. Is always slower than brute force
d. Only works for greedy algorithms
Answer: bcp-algorithms+1 - The term “bottom-up” often refers to:
a. Solving DP by iteratively filling solutions from base cases upward
b. Skipping base cases
c. Backtracking
d. No memoization
Answer: ageeksforgeeks - In Q-learning (a reinforcement learning algorithm), dynamic programming concepts are used when:
a. The transition probabilities and rewards are known
b. Data is always missing
c. Only for classification tasks
d. Training unsupervised models
Answer: astudocu+1 - DP can be used to speed up:
a. Greedy algorithms
b. Recursive approaches where results of the same subproblems are needed multiple times
c. Only linear algorithms
d. Impure functions only
Answer: bgeeksforgeeks+1 - Example of using DP for a sequence problem in ML:
a. One-hot encoding
b. Forward algorithm for probability estimation in HMMs
c. Bagging ensemble method
d. Min-max normalization
Answer: balooba+1 - Typical complexity of LCS via DP for strings of length m and n:
a. O(m × n)
b. O(n log m)
c. O(n!)
d. O(2^n)
Answer: ageeksforgeeks - Which of the following best explains the difference between DP and memoization?
a. No difference; both are brute-force
b. DP tabulation is iterative, memoization is recursive with caching
c. Memoization saves more memory
d. DP is impractical
Answer: bfaculty.gwu+1 - In DP, recomputation is avoided by:
a. Using random numbers
b. Caching intermediate subproblem solutions
c. Increasing recursion depth
d. Recoding the problem as non-overlapping
Answer: balooba+1 - Why dynamic programming is less suitable for some large real-world ML tasks?
a. Cannot handle any optimization
b. Exponential state space in some problems leads to infeasibility
c. Requires only greedy solutions
d. No caching benefit
Answer: bcp-algorithms+1 - Which phenomenon is often observed in implementing DP for ML sequence models?
a. Use of random number generators
b. Tradeoff between time and memory efficiency
c. Insertion of uninitialized values
d. Lack of recursive definition
Answer: bgeeksforgeeks+1 - The technique of storing only previously required two elements in the bottom-up Fibonacci DP solution reduces
a. Time complexity only
b. Space complexity from O(n) to O(1)
c. Results accuracy
d. Input size
Answer: bgeeksforgeeks+1
- https://www.sanfoundry.com/data-structure-questions-answers-dynamic-programming/
- https://www.alooba.com/skills/concepts/programming/programming-concepts/dynamic-programming/
- https://www.geeksforgeeks.org/dsa/introduction-to-dynamic-programming-data-structures-and-algorithm-tutorials/
- https://www.examveda.com/data-structure/practice-mcq-question-on-dynamic-programming-in-data-structures/
- https://www.geeksforgeeks.org/competitive-programming/dynamic-programming/
- https://www.scribd.com/document/883498752/Dynamic-Programming-Multiple-Choice-Questions
- https://diptisurvase.wordpress.com/wp-content/uploads/2022/09/ml-mcqs.pdf
- https://www.studocu.com/in/document/malla-reddy-group-of-institutions/computer-science-and-engineering-data-science/mcq-fb-unit-3-reference/114059006
- https://cp-algorithms.com/dynamic_programming/intro-to-dp.html
- https://faculty.cs.gwu.edu/xiaodongqu/cs3212/notes/Quiz_dp.pdf
- https://www.geeksforgeeks.org/quizzes/top-mcqs-on-dynamic-programming-with-answers/
- https://testbook.com/objective-questions/mcq-on-dynamic-programming–5eea6a0c39140f30f369e0db
- https://www.igmguru.com/blog/machine-learning-mcqs
- https://studyglance.in/objquestions/display.php?url=btech%2Fdaa-unit-3.txt&title=Design+and+Analysis+of+Algorithms++MCQs+-+Unit-3&subject=DAA&furl=data%2Fbtech%2Fbtechobjquestions.xlsx
- https://iotmumbai.bharatividyapeeth.edu/media/pdf/ETI_22618_UT1_Question_Bank_2022-23_080323.pdf
- https://www.ime.unicamp.br/~andreani/MS515/capitulo7.pdf
- https://www.scribd.com/document/882036145/DAA-MCQ-Suggestions
- https://www.geeksforgeeks.org/quizzes/top-mcqs-on-dynamic-programming-with-answers/?page=3
- https://stackoverflow.blog/2022/01/31/the-complete-beginners-guide-to-dynamic-programming/
- https://www.gyansetu.in/blog/machine-learning-mcq-quiz-interview-preparation/