Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Ayza,validated by @htprogras,@Westicles and @struct.
If you have any issues, feel free to ping them.
Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Ayza,validated by @htprogras,@Westicles and @struct.
If you have any issues, feel free to ping them.
I don’t know how much logic should I write into the solution. By having answers to the following questions, it should help.
What will be the correct answer, for this input?
4
20 male jazz
20 male rock
21 male rock
20 male
Will it be regarded as a valid input?
If it is, Is there any test case having similar feature?
There will never be inputs of the same gender and age with different genres, I had that in mind but didn’t add it, meaning you have to write logic just as mentioned in the statement. also meaning there is really no correct answer to the input you gave for this puzzle.
This direct and quick answer is very helpful in shortening my task.
It also reminds me why I should not trust any survey.
There are not enough tests and validators.
Moreover, they don’t seem to match.
That’s the beauty of machine learning. Sometimes there are patterns in the data that humans cannot see!
+1 : all tests ok but validator 4 not : I’m stuck
What if the ? are between 0 and the first value?
Passing everything but validator 4 most likely means you are not checking if the gender is in the survey answers, I have added that into the statement now
Which one should it answer first? this is the sequence of there is no genre.
array (
0 => ‘25’,
1 => ‘male’,
),
1 =>
array (
0 => ‘25’,
1 => ‘male’,
),
2 =>
array (
0 => ‘22’,
1 => ‘female’,
),
‘Male Age: 25 ~ 25 likes None’
‘Female Age: 22 ~ 25 likes rock’
None
rock
Found: rock
Expected: None
Female of age 22 is invalid, as it is below the minimum provided in the data, therefore the output is “None” not “rock”.