3 ms·
"Any sequence of length >=7, fizzbuzz will be present." Are you sure? I don't think the challenge said the sequence could not be gappy.
by Danieru 15y ago
"Any sequence of length >=7, fizzbuzz will be present."
Are you sure? I don't think the challenge said the sequence could not be gappy.
- dastbe 15y agoThis is resolved in one of the examples given in the introduction where the interviewer agrees that "buzz buzz" is an invalid sequence.
- ThePawnBreak 15y agoIf sequences could be gappy, wouldn't the solution be just mapping fizz to 3, buzz to 5 and fizbuzz to 15? ( or multiples of those numbers, if duplicates aren't allowed )
- Danieru 15y agoBut in no case would that be the shortest sequence. For your example a shorter one would be 9,10,15.