Ad
  • Custom User Avatar

    Your solution uses collection expressions, which were introduced in C# 12. Codewars currently supports C# 10, and the collection expression syntax is not supported.

    It is not a bug in this kata, but it's related to general setup of C# on Codewars. It affects all C# kata on all Codewars. Update of C# to version 12 has already been requested.

  • Custom User Avatar

    There should be at least one sample test with a valid swap.

  • Custom User Avatar

    What error? In what language?

    Your solution returns incorrect answer for pin='123\n'.

  • Default User Avatar

    My (unfinished) code passed without me considering that while writing it.

  • Custom User Avatar

    I am unpublishing the kata because it has no random tests, and as such is not ready for publication. Additionally:

    • "pass means getting more than a 5" - this sounds not right. Tests seem to accept students with 5 <= score <= 10, what makes 5 a valid score (even tho it's not more than 5), and 11 an invalid score (even though it's more than 5).

    See authoring guidelines and example kata on requirements for tests and ideas how to implement them.

  • Custom User Avatar

    we don't want an employee receiving a gift from the same employee they are gifting

    Is this anywhere in the description and I missed it?

  • Custom User Avatar

    Thank you for the guideline links. Working on the tests. n = 2 is not valid because we don't want an employee receiving a gift from the same employee they are gifting.

  • Custom User Avatar
    • The Mocha testing framework is used in an incorrect way, and causes test feedback to be really bad. Please see JS authoring guide and example kata for examples on using Mocha on Codewars.
    • It is not explained what should happen when it is not possible to swap presents.
    • Why is n=2 not a valid swap? Can't participants just exchange their gifts with each other?
  • Custom User Avatar

    Your solution seems to work now? Without seeing your code it's difficult to tell what is wrong with it.

  • Custom User Avatar

    How do you know your solution is correct if tests do not pass? :)

  • Custom User Avatar

    Applied.

  • Custom User Avatar

    It looks good now; I'll approve.

    Also, I don't really expect people to write their tests like I do; it really is something just for me. I'm glad it's understandable, though.

    Thanks a lot for the translation and feedback :)

  • Custom User Avatar
    • I changed the test suite description as you asked.
    • Your code is easy to read, but for my taste a bit too cumbersome to translate "to the letter"
  • Custom User Avatar

    Well, that was pretty fast. Thanks for the translation, though.

    Most of it looks good to me; I just think in the test cases it should be ${minN} <= n <= ${maxN}, rather than ${minN} <= |n| <= ${maxN}, since n is always non-negative.

    Also, this isn't related to your translation, but is the way I write the tests hard to read for others? It's a bit convoluted with the classes and type hints, but it's easier for me since I can reuse most of it from other katas, though I never stopped to wonder if it's making translations harder.

  • Custom User Avatar

    JS translation, please review for correctness and used types.

  • Loading more items...