Ad
  • Custom User Avatar

    Thanks for your help! I WAS mutating the input.
    Silly me!

  • Custom User Avatar

    If the tests were wrong, how would 1400 users solve it in JS? Maybe you're looking at logs for another test, maybe you're modifying the input array, and tests don't take care of that, or there could be other reasons...

  • Custom User Avatar

    No. I am questioning the expected result, it's clearly wrong on more than one of the random tests:
    25
    25
    25
    10
    4
    8
    25
    2
    25
    6
    3
    { tim: 'pissing_about',
    jim: 'pissing_about',
    randy: 'pissing_about',
    sandy: 'canteen',
    andy: 'cleaning',
    katie: 'IS',
    laura: 'pissing_about',
    saajid: 'finance',
    alex: 'pissing_about',
    john: 'trading',
    mr: 'regulation' }
    It should work for random inputs too - Expected: 'kill me now', instead got: 'party time!!'

    The input has 5 "pissing about"'s and would clearly be over 100 (Party Time), but it's expecting "kill me now"

  • Custom User Avatar

    Are you mutating the input?

  • Custom User Avatar

    In JavaScript, the random tests appear to be broken.
    1
    10
    5
    10
    10
    3
    8
    10
    10
    25
    10
    ==102
    { tim: 'accounts',
    jim: 'canteen',
    randy: 'retail',
    sandy: 'canteen',
    andy: 'canteen',
    katie: 'regulation',
    laura: 'IS',
    saajid: 'canteen',
    alex: 'canteen',
    john: 'pissing_about',
    mr: 'canteen' }
    It should work for random inputs too - Expected: 'kill me now', instead got: 'party time!!'

    It's expecting result for <=80