Ad
  • Custom User Avatar

    That means the sorted hand according to your sorting comparator differs at that spot.

    It's far from useful feedback I know.

  • Custom User Avatar

    Tests are wrong. I got an error saying "AS AD AC AH JD should equal KS AS TS QS JS", which is obviously not the case (4 of a kind should equal royal straight flush in spades?)

  • Custom User Avatar

    I agree with you. I see lots of accepted solutions to be wrong, but thankfully i've done it the right way. :)

  • Custom User Avatar

    Unfortunatelly, test cases for python and javascript is locked. I add this case to other languages and to example test cases in js and python. Thanks for report!

  • Custom User Avatar

    My accepted solution is actually wrong -- I accidentally ignored when the unique element is the second in the list. Tests should catch things like this. (To make a test, first choose your array length and then iterate through all possible positions in that array being the unique element)

  • Custom User Avatar

    Why? I think you are misunderstanding the Kata. You need to find the number that occurs an odd amount of times, not the maximum amount of times.

    array = [1, 1, 2, -2, 5, 2, 4, 4, -1, -2, 5]
    
    Number of occurences = {1: 2, 2: 2, 4: 2, 5: 2, -1: 1, -2: 2}
    
    -1 has an **odd** number of occurences of 1, whilst the rest have even occurences; therefore you should return -1.
    
  • Custom User Avatar

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

  • Custom User Avatar

    This is still an issue. Just had to "attempt" again to get a random test with a nonempty result and passed the kata.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I agree, the story is nonsense and should just be replaced with a short problem description like yours: "Given a list ls of positive integers, find the length k sublist with largest sum <= t".

  • Custom User Avatar

    Same issue here. Passes all tests, but the tab bars me from submitting the final solution.