Ad
  • Custom User Avatar

    Not sure what's happening here; whenever I submit my code, the evaluation fails with a StopIteration (after passing a few tests). Is that a variation on timing out?

    I ran a test with a 100-note list and validated that the result was 100 seconds' worth of samples, then prepended a WAV header and played it and got the expected repeating scale. So what's going wrong?

    It would help if we had some test cases that we don't have to write ourselves.

  • Custom User Avatar

    There's nothing in the example tests. Right now it only has the default sample test cases given by Codewars for Ruby.

  • Custom User Avatar

    This algorithm seems to be unclear in case when candidates have same quantity of votes...

  • Custom User Avatar

    It was pretty hard, and not very interesting kata as for me. Too much not obvious moments, and a lot of debugging.

  • Custom User Avatar

    Really nice kata to practice with.

  • Custom User Avatar

    whats wrong with this shhh
    [['Johan Liebert', 'Gihren Zabi', 'Abelt Dessler', 'Drake Luft', 'Daisuke Aramaki'], ['Abelt Dessler', 'Daisuke Aramaki', 'Gihren Zabi', 'Drake Luft', 'Johan Liebert'], ['Drake Luft', 'Gihren Zabi', 'Daisuke Aramaki', 'Johan Liebert', 'Abelt Dessler'], ['Abelt Dessler', 'Johan Liebert', 'Gihren Zabi', 'Drake Luft', 'Daisuke Aramaki'], ['Johan Liebert', 'Daisuke Aramaki', 'Drake Luft', 'Abelt Dessler', 'Gihren Zabi'], ['Abelt Dessler', 'Johan Liebert', 'Gihren Zabi', 'Drake Luft', 'Daisuke Aramaki'], ['Daisuke Aramaki', 'Gihren Zabi', 'Johan Liebert', 'Abelt Dessler', 'Drake Luft']]

    It should work for random inputs too: 'Abelt Dessler' should equal 'Johan Liebert'

    why....

  • Custom User Avatar

    Your code does not consider person with 0 votes (i.e, not in the first element of each rows combined). They have the least votes and should be removed first, followed by those who have the least votes amongst the voted candidates. (Also, your code is trying to retrieve first element from an empty row that has been removed(ex: [[], ["abc"], ["a", "b"]]), resulting in IndexError)

  • Custom User Avatar

    Your code does not consider person with 0 votes (i.e, not in the first element of each rows combined). They have the least votes and should be removed first, followed by those who have the least votes amongst the voted candidates.

  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    Issue not with kata, user is accidentally returning undefined as an object key.

  • Custom User Avatar

    Not a kata issue, user function is mutating the values used for generating error messages. Added protection against this for the future.

  • Custom User Avatar

    Always fix the tests, if a solution is invalidated by fixing the tests then it isn't a valid solution in the first place.

  • Custom User Avatar

    Still an issue with updated tests, but I have no idea why it is happening.

  • Custom User Avatar

    Does not appear to be a kata issue.

  • Custom User Avatar
  • Loading more items...