A twin of this.
FizzBuzz is where a range of positive integers is taken, and numbers divisible by 3 are replaced with "Fizz", divisible by 5 with "Buzz" and divisible by 15 with "FizzBuzz". For example, FizzBuzz from 1 to 10 is
1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz.
Your challenge is to, given a list of Fizzes, Buzzes, FizzBuzzes and a value representing an integer (I'm going to use Int), determine if it can be arranged into valid FizzBuzz.
Int, Fizz, Fizz, Buzz can be arranged into
Fizz, Buzz, Int, Fizz (for example 9,10,11,12) which is valid. But
Buzz, Fizz, Buzz cannot, as the two
Buzz need to be five values apart.
You may choose any four values to represent Fizz, Buzz, FizzBuzz and Int.
This is code-golf, shortest wins!
Int, Int, Fizz Fizz, Int, Fizz, Buzz Fizz, Fizz, Fizz, Int, Int, Int, Buzz Buzz, Int, Int, Int, Fizz, FizzBuzz FizzBuzz, Int, Int, Int, Int
Buzz, FizzBuzz, Fizz Buzz, Fizz, Buzz Int, Int, Int Fizz, Int, Fizz FizzBuzz, Int, Int, Buzz, Fizz Int, Int, Fizz, Fizz, Fizz, Buzz, Buzz