Hello team,
I invite you to discuss a possible input format for the exercise.
The suggested format is
cageSum cageSize ExcludedDigits...
Hello team,
I invite you to discuss a possible input format for the exercise.
The suggested format is
cageSum cageSize ExcludedDigits...
Canonical data which needs representing.
Example test case.
{
"uuid": "dfbf411c-737d-465a-a873-ca556360c274",
"description": "Cage with several combinations that is restricted",
"property": "combinations",
"input": {
"cage": {
"sum": 10,
"size": 2,
"exclude": [1, 4]
}
},
"expected": [[2, 8], [3, 7]]
}
sum size digits...
seems reasonable.
Using variables for the sum and size might be a bit more tidy. A lot of the other exercises rely pretty heavily on variables. @glennj What do you think?
I agree with Isaac. Both are reasonable.
We do want to keep the focus on solving the combinations, not making the input harder to parse. So, as long as the input is clearly documented:
awk -f sudoku.awk <<< "10 2 1 4"
might output
2 8
3 7
Fine, I kept the current example solution.
Hi colleagues,
Please review: