
Greedy Algorithms Quiz

Quiz
•
Other
•
University
•
Medium
Sanzana Karim Lora
Used 1+ times
FREE Resource
44 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
For the greedy coin change algorithm to always produce an optimal solution, what must be true about the coin denominations?
Arithmetic progression
Geometric progression
Greedy choice property (canonical set)
Prime numbers
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of greedy coin change assuming sorted coins?
O(n²)
O(n log n)
O(n)
O(1)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is FALSE about greedy coin change?
Always minimal coins for any coin set
Picks largest coin possible each step
May fail for some coin sets
Efficient in time complexity
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Using coins {25,10,5,1}, how many coins does greedy pick to make 30?
3
2
4
5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When does the greedy coin change fail?
Coins {1,3,4}, amount 6
Coins {1,5,10}, amount 15
Coins {1,2,5,10}, amount 7
Coins {1,10,25}, amount 35
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If coin denominations are unsorted, what is the impact?
No effect
May not pick largest coin first
Algorithm runs faster
Algorithm is always incorrect
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Greedy coin change picks coins in what order?
Ascending by value
Descending by value
Random order
Based on frequency
Create a free account and access millions of resources
Similar Resources on Wayground
45 questions
Digital MKT - Basic

Quiz
•
University
40 questions
Accounting for Government & NPO Final Exam

Quiz
•
University
48 questions
finals/katapusan sa DAA

Quiz
•
University
45 questions
CS 213 - Long Quiz

Quiz
•
University
40 questions
Quants

Quiz
•
University
41 questions
quiz 5 hospitality technolog

Quiz
•
University
39 questions
Quiz: Smarter Than a 5th Grader?

Quiz
•
10th Grade - University
40 questions
Accounting for Government & NPO

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade