[SOLVED] Hunger Games pass tests but not validators


#1

Hello,

The title says it all, I pass all test on easy puzzle Hunger Games but I don’t pass the last validator ( the 6th ) and I really don’t know why, I wrote again my solution twice, made some backwards and I’ve got the same result … anybody had the same problem and pass it ?

Thanks !


#2

it seems you didn’t respect this rule when one adventurer killed several:

All information is expected to be in alphabetical order

I’m surprised though that it isn’t tested by any IDE test. Perhaps we need to update the puzzle.
I can give you the validator if needed.


#3

Ok found the problem, sorry !

You was kinda right, I didn’t respect entirely the rule, I did the sorting when inserting killed person but forgot to do a sort each time I add new killed person. This way it passed the test 6 ( Alphabetize Victims ) where it’s indeed mandatory. So the tests are good, i’m just a dumbass :smiley:

Thanks a lot !


#4

For anyone who maybe have the same problem, don’t sort the victims by alphabetical order when inserting them but when parsing them :wink: