Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 4 MCQs Greedy techniques

CSE329 — Prelude To Competitive Coding 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Greedy problem solving paradigm Easy

    What is the core idea behind the greedy algorithm paradigm?

  2. Question 2 of 60 Locally optimal choice Easy

    In greedy algorithms, a "locally optimal choice" refers to a decision that is:

  3. Question 3 of 60 Global optimal choice Easy

    A greedy algorithm always produces a globally optimal solution when:

  4. Question 4 of 60 Job Sequencing problem Easy

    In the Job Sequencing problem with deadlines, the goal is to:

  5. Question 5 of 60 Job Sequencing problem Easy

    To apply the greedy strategy in Job Sequencing, jobs are typically sorted by:

  6. Question 6 of 60 Job Selection problem Easy

    In job selection problems, greedy techniques help decide which jobs to pick in order to:

  7. Question 7 of 60 Minimum product subset of an array Easy

    For the array , what is the minimum product subset value?

  8. Question 8 of 60 Minimum product subset of an array Easy

    To get a negative minimum product from an array, the subset should include:

  9. Question 9 of 60 Maximum product subset of an array Easy

    For the array , what is the maximum product subset value?

  10. Question 10 of 60 Minimum sum of product of two arrays Easy

    To minimize the sum of products of two arrays (one element from each), you should:

  11. Question 11 of 60 Bin packing problem Easy

    The Bin Packing problem aims to:

  12. Question 12 of 60 Bin packing problem Easy

    Which of the following is a common greedy heuristic for the Bin Packing problem?

  13. Question 13 of 60 Activity Selection problem Easy

    In the Activity Selection problem, activities are greedily selected by sorting them according to their:

  14. Question 14 of 60 Activity Selection problem Easy

    The objective of the Activity Selection problem is to:

  15. Question 15 of 60 Fractional Knapsack problem Easy

    In the Fractional Knapsack problem, items are chosen greedily based on their:

  16. Question 16 of 60 Fractional Knapsack problem Easy

    Which key feature distinguishes the Fractional Knapsack from the 0/1 Knapsack problem?

  17. Question 17 of 60 Connect n ropes with minimum cost Easy

    In the "Connect n ropes with minimum cost" problem, which data structure is most suitable?

  18. Question 18 of 60 Connect n ropes with minimum cost Easy

    Given ropes of lengths , what is the minimum total cost to connect them all?

  19. Question 19 of 60 Coin change problem Easy

    The greedy approach to the Coin Change problem selects coins by:

  20. Question 20 of 60 Majority Element Easy

    A majority element in an array of size is an element that appears more than:

  21. Question 21 of 60 Greedy problem solving paradigm Medium

    In a greedy algorithm, a solution is built incrementally. Which property is essential for a greedy algorithm to always produce a globally optimal solution?

  22. Question 22 of 60 Locally optimal choice Medium

    A greedy algorithm makes a locally optimal choice at each step. What is the main risk of relying only on local optimality?

  23. Question 23 of 60 Global optimal choice Medium

    For which of the following problems does the greedy approach guarantee a globally optimal solution?

  24. Question 24 of 60 Job Sequencing problem Medium

    In the Job Sequencing with Deadlines problem, jobs are first sorted by which criterion to maximize total profit?

  25. Question 25 of 60 Job Sequencing problem Medium

    Given jobs with (profit, deadline): , , , , . What is the maximum profit achievable if each job takes one unit of time?

  26. Question 26 of 60 Job Selection problem Medium

    When selecting the maximum number of non-overlapping jobs (each with a start and finish time), the greedy strategy selects jobs based on:

  27. Question 27 of 60 Minimum product subset of an array Medium

    For the array , what is the minimum product of a non-empty subset?

  28. Question 28 of 60 Minimum product subset of an array Medium

    If an array contains a zero, some negatives, and some positives, when is the minimum product subset equal to a negative value rather than zero?

  29. Question 29 of 60 Maximum product subset of an array Medium

    For the array , what is the maximum product of a non-empty subset?

  30. Question 30 of 60 Maximum product subset of an array Medium

    To compute the maximum product subset, if the array has an odd number of negative numbers, the greedy rule is to:

  31. Question 31 of 60 Minimum sum of product of two arrays Medium

    Given arrays and , the minimum sum of element-wise products (with one permutation allowed) is obtained by pairing:

  32. Question 32 of 60 Minimum sum of product of two arrays Medium

    The rearrangement inequality states that the sum is minimized when the two sequences are:

  33. Question 33 of 60 Bin packing problem Medium

    In the First Fit Decreasing (FFD) heuristic for bin packing, items are processed in what order?

  34. Question 34 of 60 Bin packing problem Medium

    The bin packing problem (minimizing number of bins) is known to be:

  35. Question 35 of 60 Activity Selection problem Medium

    Given activities with (start, finish): , how many activities can be selected using the greedy earliest-finish-time rule?

  36. Question 36 of 60 Fractional Knapsack problem Medium

    In the Fractional Knapsack problem with capacity , items (value, weight) are . What is the maximum value obtainable?

  37. Question 37 of 60 Connect n ropes with minimum cost Medium

    For ropes of lengths , what is the minimum total cost to connect them all into one rope?

  38. Question 38 of 60 Connect n ropes with minimum cost Medium

    Which data structure gives the most efficient implementation for the 'connect n ropes with minimum cost' problem?

  39. Question 39 of 60 Coin change problem Medium

    The greedy coin change algorithm (always picking the largest denomination) fails to give the minimum number of coins for which coin system when making amount 6?

  40. Question 40 of 60 Majority Element Medium

    The Boyer-Moore Voting Algorithm finds a majority element (appearing more than times) in:

  41. Question 41 of 60 Greedy problem solving paradigm Hard

    A greedy algorithm is guaranteed to produce a globally optimal solution only when the problem exhibits which two properties?

  42. Question 42 of 60 Locally optimal choice Hard

    Consider making change for using coins . What is the difference between the number of coins the greedy (largest-first) approach uses versus the true optimal?

  43. Question 43 of 60 Job Sequencing problem Hard

    In Job Sequencing with deadlines (each job takes unit time), jobs are : . What is the maximum total profit?

  44. Question 44 of 60 Job Selection problem Hard

    When scheduling to maximize the number of non-overlapping jobs, which greedy criterion guarantees optimality?

  45. Question 45 of 60 Minimum product subset of an array Hard

    For the array , what is the minimum product of a non-empty subset?

  46. Question 46 of 60 Maximum product subset of an array Hard

    For the array , what is the maximum product of a non-empty subset?

  47. Question 47 of 60 Minimum sum of product of two arrays Hard

    Given and , arranging freely (only reorder within each array), the minimum value of is:

  48. Question 48 of 60 Bin packing problem Hard

    Which statement about the First-Fit Decreasing (FFD) heuristic for bin packing is correct?

  49. Question 49 of 60 Activity Selection problem Hard

    Activities with : . Using the earliest-finish-time greedy, how many activities can be selected?

  50. Question 50 of 60 Fractional Knapsack problem Hard

    Items : with capacity . What is the maximum value obtainable in the fractional knapsack?

  51. Question 51 of 60 Connect n ropes with minimum cost Hard

    For ropes of lengths , the minimum total cost to connect them all into one rope is:

  52. Question 52 of 60 Coin change problem Hard

    For which of the following coin systems is the greedy (largest-coin-first) algorithm guaranteed to be optimal for every amount?

  53. Question 53 of 60 Majority Element Hard

    In the Boyer-Moore Voting Algorithm, after the first pass finds a candidate, why is a second pass usually required?

  54. Question 54 of 60 Problems based on greedy techniques Hard

    You want to form the largest possible number by concatenating integers from . Which comparator correctly orders two strings ?

  55. Question 55 of 60 Fractional Knapsack problem Hard

    Why does the greedy approach fail for the 0/1 Knapsack but succeed for the Fractional Knapsack?

  56. Question 56 of 60 Job Sequencing problem Hard

    Using a Disjoint-Set (Union-Find) optimization for job sequencing with maximum deadline , the time complexity to schedule jobs becomes approximately:

  57. Question 57 of 60 Minimum product subset of an array Hard

    For an array containing exactly one zero, some positive numbers, and an even number of negatives (all nonzero), the minimum product subset equals:

  58. Question 58 of 60 Activity Selection problem Hard

    Suppose each activity also carries a weight and we want the maximum-weight set of non-overlapping activities. Which approach is correct?

  59. Question 59 of 60 Global optimal choice Hard

    Which of the following classic problems does NOT admit a correct greedy solution guaranteeing a global optimum?

  60. Question 60 of 60 Connect n ropes with minimum cost Hard

    If we instead wanted to MAXIMIZE the total cost of connecting ropes , which strategy and cost is correct?

That's unit 4

Answer a few questions and your score shows up here.