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
- 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 - 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 - 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 - 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 - Dijkstra’s algorithm is an example of:
a. Dynamic programming
b. Divide and conquer
c. Backtracking
d. Greedy algorithm
Answer: dsanfoundry+1 - Greedy algorithms do not always guarantee:
a. Speed
b. Memory efficiency
c. Optimal global solution
d. Simplicity
Answer: cstudyglance+1 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - Which property is NOT required for a greedy choice?
a. Feasibility
b. Globally optimal
c. Locally optimal
d. Irrevocability
Answer: bscribd - 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 - 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 - Huffman Coding is a greedy algorithm used for:
a. Sorting
b. Searching
c. Compression
d. Optimization
Answer: cgeeksforgeeks+1 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - In greedy algorithms, time complexity is often:
a. Exponential
b. Polynomial or better
c. Always constant
d. Always O(n^3)
Answer: bgeeksforgeeks+1 - 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 - The process of making decisions in a greedy algorithm is:
a. Irreversible
b. Probabilistic
c. Recursive
d. Dynamic
Answer: astudyglance+1 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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
- https://www.w3schools.com/dsa/dsa_ref_greedy.php
- https://www.geeksforgeeks.org/dsa/greedy-algorithms/
- https://dev.to/jayaprasanna_roddam/dsa-greedy-algorithms-interview-preparation-questions-3mi3
- https://getsdeready.com/greedy-algorithms/
- https://www.freecodecamp.org/news/greedy-algorithms/
- https://www.sanfoundry.com/greedy-algorithms-multiple-choice-questions-mcq/
- https://www.codecademy.com/article/greedy-algorithm-explained
- 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
- https://easyexamnotes.com/study-of-greedy-strategy-mcq/
- https://www.geeksforgeeks.org/dsa/greedy-best-first-search-algorithm/
- https://www.scribd.com/document/865042725/Greedy-Dynamic-Programming-MCQs
- https://www.programiz.com/dsa/greedy-algorithm
- https://www.simplilearn.com/tutorials/data-structure-tutorial/greedy-algorithm
- https://testbook.com/objective-questions/mcq-on-greedy-algorithms–5eea6a0c39140f30f369e0d6
- https://www.geeksforgeeks.org/quizzes/top-mcqs-on-greedy-algorithms-with-answers/
- https://wayground.com/admin/quiz/6764a1ad5809535ad134b7d4/greedy-algorithms-quiz
- https://www.youtube.com/watch?v=GVvN0ikNekw
- https://www.youtube.com/watch?v=4av-93EG5Xk
- https://www.geeksforgeeks.org/quizzes/top-mcqs-on-greedy-algorithms-with-answers/?page=3