Skip to content

Add solution for Issue #2605: Fresh Donuts#2678

Merged
hackdartstorm merged 2 commits intohackdartstorm:mainfrom
Dev-06-06:feature/1815-fresh-donuts
Feb 24, 2026
Merged

Add solution for Issue #2605: Fresh Donuts#2678
hackdartstorm merged 2 commits intohackdartstorm:mainfrom
Dev-06-06:feature/1815-fresh-donuts

Conversation

@Dev-06-06
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 23, 2026 18:30
@Dev-06-06
Copy link
Copy Markdown
Contributor Author

Fixes #2660

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a solution for the "Fresh Donuts" problem (Issue #2605), which aims to maximize the number of happy customer groups at a donut shop. A group is happy if they arrive when there's a fresh batch of donuts. The solution uses dynamic programming with memoization to optimize the arrangement of groups.

Changes:

  • Implements a three-phase algorithm: counting groups with zero remainder, greedily matching complementary remainders, and using DFS with memoization to optimize remaining groups
  • Includes test cases demonstrating the solution with different batch sizes and group configurations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread exercises/1000_programs/medium/1815_fresh_donuts.py
Comment thread exercises/1000_programs/medium/1815_fresh_donuts.py Outdated
Comment thread exercises/1000_programs/medium/1815_fresh_donuts.py
Comment thread exercises/1000_programs/medium/1815_fresh_donuts.py
Comment thread exercises/1000_programs/medium/1815_fresh_donuts.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hackdartstorm hackdartstorm merged commit 69bad55 into hackdartstorm:main Feb 24, 2026
@Dev-06-06 Dev-06-06 deleted the feature/1815-fresh-donuts branch February 24, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants