Ad
  • Custom User Avatar

    Yes, I missed that. I was just coming back to say I figured it out why! :D Thanks!

  • Custom User Avatar

    I understand what you are saying. I did it on C#. Still, for me, the input validation and trick requirements are a bit beyond 8kyu, especially if it happens to be your first time on Codewars too.

  • Custom User Avatar

    Ah, ok, now it makes sense. It is very weird to show all Logs into the same one though, it is the first time this happens.

    I updated my code and I get the correct result everytime just that now I have another weird issue: System.InvalidOperationException : Sequence contains no elements.
    What sequence and where and why, since I get the correct list at the end and I use a different list, not the original one, as it says not to mutate that one.

    Exit log with appropiate comment prints at the end to differentiate between test cases:

    min is 1
    2
    3
    4
    5
    end of test
    min is 1
    5
    3
    2
    4
    end of test
    min is 1
    2
    3
    1
    1
    end of test
    
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This is a level 7 kata. The input is an object array (some people barely even know arrays at 8 kyu), the input requires validation, there different requirements for both the positives and the negatives (making it confusing even if you got it right) and the output must be again an object array.

  • Custom User Avatar

    For C# I am very confused. The result is the expected one yet it reads it from the end?

    Whenever I Console.WriteLine the input list and the exit list I get a weird double list printed in between formed from the original list concatenated to the original list reversed and then the error comes because it reads somehow this reversed list?

    This is what I get (the first is the input and the last is the output and the output matches the requirement so it should be a passed test):

    1
    2
    3
    4
    5

    2
    3
    4
    5
    5
    3
    2
    1
    4

    2
    3
    4
    5

    Test Failed
    Expected and actual are both <System.Collections.Generic.List`1[System.Int32]> with 4 elements
    Values differ at index [0]
    Expected: 5
    But was: 2

  • Custom User Avatar

    Ok, now I can tell if something is wrong from my side. Thanks!
    L.E.: There, now I fixed it! Easier when the error message points the right way!

  • Custom User Avatar

    Then why does my code work in Visual Studio and not here and why does Codewars say Expected: 'null' received 'Open'?

    How can my "bad" code get Codewars to say it expected a null result? Do you realize what you are saying?

    Here, since there are no expected null results, please explain this:

    Test Failed
    Expected and actual are both <System.String[10]>
    Values differ at index [3]
    Expected: null
    But was: "Open"

  • Custom User Avatar

    For C# I have 'Expected: "null"' for the Random Test Cases and there are no indications as to where there are "null" results, just "Senior" and "Open".

    I have seen that for some Python users there was a limit of 25 for the age. I tried if the age was under 18 then the result is "null" as opposed to the expected strings. Somehow Codewars just made all my results "null" not just the true tests. I verified it in Visual Studio and it worked but not here.

    Regardless, I think you should at least mention the expected null test cases if not remove it entirely.

  • Custom User Avatar

    Oh my God! Now I got it! Thank you so much! That description is so BADLY WRITTEN! It made no sense what I was supposed to do...

  • Custom User Avatar

    Whoaaa, I am rather new to programming yet this probably is the most confusing kata description I have ever seen.

  • Custom User Avatar

    Once you realize what you need to do, yes, it is quite clear. The discussion helped me realize, to be honest. It is rather easy to be misinterpreted though. This kata is more about jumping to conclusions than the actual exercise itself. :)

  • Custom User Avatar

    This is without any loops, as requested to increase the challenge!