Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Added tests to validate that the function throws errors on invalid input, such as duplicate values with different priorities
I have corrected the description, is there anything else that needs to be corrected?
so let me add the markup to the description and then we'll look at it again and you can ask questions if you have any because I'm also confused
absolutely right :) I changed the example and description to suit your issue. If you still have questions, write it :)
The description has been updated to clearly specify the concept of sets and their constraints, and the function signature is now presented separately from the examples for clarity. Thank you for the feedback!
Each set contains unique values. If there are multiple entries with the same value but different priorities, it should be considered invalid and throw an error
"Thank you for the feedback! I have clarified in the description that each set should contain unique values, meaning no duplicate values are allowed within a set, regardless of priority. If a value appears multiple times in a set with different priorities, it will be considered invalid, and an error will be thrown."
Thank you for pointing this out — you're absolutely right.
I'll add randomized tests to prevent hardcoded solutions and better validate correctness.
Thanks for the clarification, I have updated the task description.
Round each remaining transaction’s amount to 2 decimal places, using round half up (e.g., 7.1255 → 7.13, 10.014 → 10.01).