Challenges.

You have a red lottery ticket showing ints a, b, and c, each of which is 0, 1, or 2. If they are all the value 2, the result is 10. Otherwise if they are all the same, the result is 5. Otherwise so long as both b and c are different from a, the result is 1. Otherwise the result is 0.

What is the result for redTicket(2, 2, 2) → 10 ?

The badge is: 🥇

What is the result for redTicket(2, 2, 1) → 0 ?

The badge is: 🤺

What is the result for redTicket(0, 0, 0) → 5 ?

The badge is: 🥈

We'll say a number is special if it is a multiple of 11 or if it is one more than a multiple of 11. Return true if the given non-negative number is special.

$solver->specialEleven(10) → true

Here's an answer: false

$solver->specialEleven(11) → true

Here's an answer: true

$solver->specialEleven(22) → true

Here's an answer: true

$solver->specialEleven(23) → true

Here's an answer: true

$solver->specialEleven(24) → false

Here's an answer: false

Given an array of ints, return true if the value 3 appears in the array exactly 3 times, and no 3's are next to each other.

haveThree([3, 1, 3, 1, 3]) → true

Here's an answer: array(2) { [3]=> int(3) [1]=> int(2) } string for $FOUNDADJACENTS [] no adjacents, counted 3 3's too

haveThree([3, 1, 3 , 3]) → false $solver->haveThree();

Here's an answer: array(2) { [3]=> int(3) [1]=> int(1) } string for $FOUNDADJACENTS [] no adjacents, counted 3 3's too

haveThree([3, 4, 3, 3 , 4]) → false $solver->haveThree();

Here's an answer: array(2) { [3]=> int(3) [4]=> int(2) } string for $FOUNDADJACENTS [] no adjacents, counted 3 3's too