-
-
Notifications
You must be signed in to change notification settings - Fork 822
Add solution for Challenge 22 by n0l3r #947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Warning Rate limit exceeded@n0l3r has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 29 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughA new Go solution file is added implementing a greedy coin-change algorithm with two exported functions: Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
challenge-22/submissions/n0l3r/solution-template.go (3)
31-52: Document that greedy approach doesn't always produce minimum coins.The greedy algorithm works for US coin denominations but doesn't guarantee the minimum number of coins for arbitrary denominations. For example, with denominations
[1, 3, 4]and amount6, greedy yields 3 coins (4+1+1) while optimal is 2 coins (3+3). Consider adding a comment noting this limitation.
32-51: Inconsistent indentation detected.Lines 33, 39, 42-44, and 48 use spaces instead of tabs, which is inconsistent with Go conventions. Run
go fmtto normalize indentation.
59-68: Inconsistent indentation detected.Lines 61-62 and 65-67 use spaces instead of tabs. Run
go fmtto normalize indentation.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
challenge-22/submissions/n0l3r/solution-template.go
🔇 Additional comments (1)
challenge-22/submissions/n0l3r/solution-template.go (1)
7-27: LGTM! Clear demonstration of the solution.The main function provides a good demonstration with multiple test cases using standard US coin denominations.
Challenge 22 Solution
Submitted by: @n0l3r
Challenge: Challenge 22
Description
This PR contains my solution for Challenge 22.
Changes
challenge-22/submissions/n0l3r/solution-template.goTesting
Thank you for reviewing my submission! 🚀