Blog

MCQs

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

  1. What is the main principle behind a greedy algorithm?
    a. Tries every possible solution
    b. Makes the locally optimal choice at each step
    c. Backtracks when a solution fails
    d. Considers future consequences of every action
    Answer: bw3schools+1​
  2. Which problem is efficiently solved by a greedy approach?
    a. Traveling Salesman Problem
    b. Activity Selection Problem
    c. Sudoku
    d. Subset Sum Problem
    Answer: bdev+1​
  3. The greedy algorithm makes decisions based on:
    a. Entire input at once
    b. Future predictions
    c. Current information only
    d. Exhaustive search
    Answer: cfreecodecamp+1​
  4. Which property is essential for a problem to be solved optimally by a greedy algorithm?
    a. Memoization
    b. Overlapping subproblems
    c. Optimal substructure and greedy choice property
    d. Randomization
    Answer: cgetsdeready+1​
  5. Dijkstra’s algorithm is an example of:
    a. Dynamic programming
    b. Divide and conquer
    c. Backtracking
    d. Greedy algorithm
    Answer: dsanfoundry+1​
  6. Greedy algorithms do not always guarantee:
    a. Speed
    b. Memory efficiency
    c. Optimal global solution
    d. Simplicity
    Answer: cstudyglance+1​
  7. Which of these is a classic greedy problem?
    a. Fractional Knapsack Problem
    b. Binary Search
    c. Matrix Chain Multiplication
    d. Floyd-Warshall Algorithm
    Answer: aeasyexamnotes+1​
  8. During execution, a greedy algorithm:
    a. Looks ahead several steps
    b. Evaluates all possibilities before making a move
    c. Makes a single best local choice at every step
    d. Always performs recursion
    Answer: cw3schools+1​
  9. Which is NOT an example of a greedy algorithm?
    a. Prim’s Minimum Spanning Tree
    b. Kruskal’s Minimum Spanning Tree
    c. Quick Sort
    d. Huffman Coding
    Answer: csanfoundry+1​
  10. What is the greedy step in the coin change problem?
    a. Choose the smallest denomination coin
    b. Choose a coin randomly
    c. Choose the highest denomination coin not exceeding remaining amount
    d. Choose two coins at a time
    Answer: cfreecodecamp+1​
  11. In greedy algorithms, once a choice is made:
    a. It can be changed later
    b. It is final and cannot be changed
    c. Depends on recursion
    d. None of the above
    Answer: bstudyglance+1​
  12. Which among the following is solved using greedy technique?
    a. 0/1 Knapsack Problem
    b. Fractional Knapsack Problem
    c. Longest Common Subsequence
    d. Matrix Chain Order
    Answer: bcodecademy+1​
  13. What is the first step in a naïve greedy algorithm for network flow?
    a. Adding flows with higher values
    b. Reversing flow if required
    c. Starting with zero flow
    d. Recursive division
    Answer: csanfoundry​
  14. Greedy best-first search in AI differs from A* because it:
    a. Uses only heuristic to decide the next node
    b. Considers both heuristic and distance from source
    c. Is recursive
    d. Uses memoization
    Answer: ageeksforgeeks​
  15. Which property is NOT required for a greedy choice?
    a. Feasibility
    b. Globally optimal
    c. Locally optimal
    d. Irrevocability
    Answer: bscribd​
  16. The main disadvantage of a greedy algorithm is:
    a. High computational complexity
    b. May not yield optimal global solution
    c. Too many parameters
    d. Requires exhaustive memory
    Answer: bgeeksforgeeks+1​
  17. In the activity selection problem, the greedy choice is:
    a. Select the last activity to finish
    b. Select the activity with the shortest duration
    c. Select the earliest start activity
    d. Select the earliest finish activity
    Answer: ddev+1​
  18. Huffman Coding is a greedy algorithm used for:
    a. Sorting
    b. Searching
    c. Compression
    d. Optimization
    Answer: cgeeksforgeeks+1​
  19. Which of the following represents the greedy choice property?
    a. Solution to a problem can be constructed from optimal solutions to subproblems
    b. Making a choice that seems the best for the moment
    c. Using dynamic programming recursively
    d. Employing divide and conquer
    Answer: bprogramiz+1​
  20. What characterizes a greedy algorithm’s operation on a candidate set?
    a. Branch and bound all members
    b. Random permutation
    c. Ranking and picking the best
    d. Backtracking
    Answer: csimplilearn​
  21. Which of the following is LEAST likely solved by a greedy algorithm?
    a. Minimum spanning tree
    b. Shortest path in weighted, undirected graphs with negative weights
    c. Activity scheduling
    d. Fractional Knapsack
    Answer: bcodecademy+1​
  22. Greedy algorithms work best when:
    a. Only a local optimum is feasible
    b. Choices don’t affect future options
    c. Problem has optimal substructure and greedy-choice property
    d. Problem requires complete enumeration
    Answer: cgetsdeready+1​
  23. The main difference between greedy and dynamic programming is:
    a. Greedy solves overlapping subproblems
    b. Dynamic programming uses memoization, greedy does not
    c. Both solve subproblems the same way
    d. Both never backtrack
    Answer: btestbook​
  24. Which scenario highlights the failure of a greedy approach?
    a. Coin denominations 1, 3, 4—make sum 6
    b. All denominations are multiples of each other
    c. Only one denomination available
    d. Choosing the largest item always gives global optimum
    Answer: asanfoundry​
  25. What problem is naturally modeled using the greedy method?
    a. Activity Scheduling
    b. Maximum Subarray Sum
    c. Longest Increasing Subsequence
    d. Shortest Common Supersequence
    Answer: adev+1​
  26. Which is NOT a necessary component of a greedy algorithm?
    a. Candidate solution set
    b. Solution ranking criteria
    c. Selection function
    d. Overlapping subproblems
    Answer: dsimplilearn​
  27. Which of these AI algorithms is inherently greedy?
    a. Breadth-first search
    b. Greedy best-first search
    c. Minimax search
    d. Monte Carlo Tree Search
    Answer: bgeeksforgeeks​
  28. In job sequencing with deadlines, the greedy approach:
    a. Randomly assigns jobs
    b. Selects jobs with shortest deadlines first
    c. Selects jobs with highest profits first that meet the deadline
    d. Tries every possible schedule
    Answer: cstudyglance+1​
  29. When can a greedy algorithm be guaranteed to find the globally optimal solution?
    a. When there are no constraints
    b. If the problem has the optimal substructure and greedy-choice property
    c. When the optimal solution is always unique
    d. Only if recursion is used
    Answer: bgetsdeready+1​
  30. Which of the following is false about greedy algorithms?
    a. They always find a solution
    b. They may not always find optimal solution
    c. They use local heuristic decisions
    d. They don’t backtrack
    Answer: aw3schools+1​
  31. What is the greedy step in Prim’s algorithm for minimum spanning tree?
    a. Pick the largest edge
    b. Pick the edge with smallest weight connecting to tree
    c. Pick random edge
    d. Pick two edges at a time
    Answer: bdev+1​
  32. The greedy approach in fractional knapsack is to:
    a. Pick minimum value items first
    b. Pick maximum weight items first
    c. Pick items with highest value-to-weight ratio
    d. Select half from each item
    Answer: ceasyexamnotes+1​
  33. Which does NOT use a greedy algorithm?
    a. Huffman Coding
    b. Dijkstra’s Algorithm
    c. Branch and Bound for Knapsack (0-1 Knapsack)
    d. Activity Selection Problem
    Answer: ctestbook+1​
  34. What justifies a greedy approach in AI path finding?
    a. All solutions have equal costs
    b. Heuristic reliably leads to the goal in the shortest way
    c. Complete randomness is necessary
    d. Solution is found via recursion
    Answer: bgeeksforgeeks+1​
  35. In greedy algorithms, time complexity is often:
    a. Exponential
    b. Polynomial or better
    c. Always constant
    d. Always O(n^3)
    Answer: bgeeksforgeeks+1​
  36. Why can’t greedy always solve 0/1 knapsack optimally?
    a. Because choices can’t be reversed and local optimum may not be global
    b. Recursion is not used
    c. Only partial items can be selected
    d. Items cannot be ordered
    Answer: acodecademy+1​
  37. The process of making decisions in a greedy algorithm is:
    a. Irreversible
    b. Probabilistic
    c. Recursive
    d. Dynamic
    Answer: astudyglance+1​
  38. Which property should a problem have for greedy approach to work?
    a. Subproblem optimality
    b. Branch and bound
    c. Monte Carlo property
    d. Randomized choice
    Answer: agetsdeready+1​
  39. What is the main merit of a greedy algorithm?
    a. Simplicity and speed
    b. Always finds optimal solution
    c. Exhausts search space
    d. Works for all problems
    Answer: afreecodecamp+1​
  40. In Huffman coding, at every step:
    a. Merge two least frequent nodes
    b. Pick the most frequent node only
    c. Merge two most frequent nodes
    d. No order is needed
    Answer: ageeksforgeeks+1​
  41. Which is necessary for a greedy approach to be correct?
    a. Previous choices mustn’t constrain optimal remaining choices
    b. All candidates must be evaluated exhaustively
    c. Recursion must be used
    d. Longest solution path
    Answer: aprogramiz+1​
  42. At each step of a greedy method, a decision is made that appears to be the:
    a. Worst
    b. Irrelevant
    c. Best at that moment
    d. Random
    Answer: cw3schools+1​
  43. Which is not generally characteristic of greedy algorithms?
    a. Locally optimal decisions
    b. Decisions are changed later
    c. No backtracking
    d. Simplicity in implementation
    Answer: bstudyglance+1​
  44. What is the greedy step in Kruskal’s minimum spanning tree algorithm?
    a. Pick edge forming cycles
    b. Pick edge with minimum weight not forming cycle
    c. Pick maximum edge
    d. Pick edges randomly
    Answer: bsanfoundry+1​
  45. What is a drawback of using greedy best-first search in AI?
    a. Does not guarantee the shortest path
    b. Slow for small problems
    c. Uses excessive memory
    d. Is always incorrect
    Answer: ageeksforgeeks+1​
  46. In which scenario does greedy algorithm fail for the coin change problem?
    a. Coin denominations are powers of 2
    b. Denominations are optimal for greedy method
    c. Non-standard denominations
    d. All denominations are equal
    Answer: cfreecodecamp+1​
  47. What is the output of a greedy algorithm if locally optimal choice leads to no solution?
    a. Optimal solution
    b. No solution or suboptimal solution
    c. Always correct path
    d. Infinite loop
    Answer: bgetsdeready+1​
  48. What defines the pruning process in greedy algorithms?
    a. Removing worse solutions from candidates
    b. Adding all possible candidates
    c. Stopping midway
    d. Always taking random action
    Answer: asimplilearn​
  49. In the job sequencing problem, each job usually has:
    a. Start and end time
    b. Profit and deadline
    c. Only profit
    d. Only start time
    Answer: bdev+1​
  50. When a greedy algorithm is applied to an optimization problem, it seeks to:
    a. Explore all possible answers
    b. Seek the best local choice without considering others
    c. Reserve optimality for future iterations
    d. Always use recursion to backtrack
    Answer: bw3schools+1​
  1. https://www.w3schools.com/dsa/dsa_ref_greedy.php
  2. https://www.geeksforgeeks.org/dsa/greedy-algorithms/
  3. https://dev.to/jayaprasanna_roddam/dsa-greedy-algorithms-interview-preparation-questions-3mi3
  4. https://getsdeready.com/greedy-algorithms/
  5. https://www.freecodecamp.org/news/greedy-algorithms/
  6. https://www.sanfoundry.com/greedy-algorithms-multiple-choice-questions-mcq/
  7. https://www.codecademy.com/article/greedy-algorithm-explained
  8. https://studyglance.in/objquestions/display.php?url=btech%2Fdaa-unit-4.txt&title=Design+and+Analysis+of+Algorithms++MCQs+-+Unit-4&subject=DAA&furl=data%2Fbtech%2Fbtechobjquestions.xlsx
  9. https://easyexamnotes.com/study-of-greedy-strategy-mcq/
  10. https://www.geeksforgeeks.org/dsa/greedy-best-first-search-algorithm/
  11. https://www.scribd.com/document/865042725/Greedy-Dynamic-Programming-MCQs
  12. https://www.programiz.com/dsa/greedy-algorithm
  13. https://www.simplilearn.com/tutorials/data-structure-tutorial/greedy-algorithm
  14. https://testbook.com/objective-questions/mcq-on-greedy-algorithms–5eea6a0c39140f30f369e0d6
  15. https://www.geeksforgeeks.org/quizzes/top-mcqs-on-greedy-algorithms-with-answers/
  16. https://wayground.com/admin/quiz/6764a1ad5809535ad134b7d4/greedy-algorithms-quiz
  17. https://www.youtube.com/watch?v=GVvN0ikNekw
  18. https://www.youtube.com/watch?v=4av-93EG5Xk
  19. https://www.geeksforgeeks.org/quizzes/top-mcqs-on-greedy-algorithms-with-answers/?page=3

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!