Ad
  • Custom User Avatar

    Merged.

  • Default User Avatar

    here is a proposed fix

  • Default User Avatar

    The issue with duplicated scores is still not fixed for C#. I can not finish the kata because of the random tests.

  • Custom User Avatar

    would you know how to do it in C#?

  • Default User Avatar

    I misread the issue -> I thought there were duplicate keys. Just create a list of random integers upfront (use a hashset and don't stop generating until you have enough unique items in the collection), shuffle them and use them one by one as dictionary value.

  • Default User Avatar

    change this:

    Func<Dictionary<string, int>> randTestCase = () => Enumerable.Range(0, rnd.Next(2, 20)).ToDictionary(_ => randStr(), _ => rnd.Next(0, 101));
    

    into this:

    Func<Dictionary<string, int>> randTestCase = () => Enumerable.Range(0, rnd.Next(2, 20)).Select(_ => randStr()).Distinct().ToDictionary(_ => _, _ => rnd.Next(0, 101));
    
  • Custom User Avatar

    If anybody with a C# knowledge stumbles on this, please fork the translation, or at least put a comment here on what and how to change!

    Thanks

  • Custom User Avatar

    Knock-knock. Are you still around? Could ypu please check the above issues with C#?

  • Default User Avatar

    The C# Translation does not guarantee that unique scores are generated.