Given an X, what math is needed to find its Y, using this table?
| x | y |
|---|---|
| 0 | 1 |
| 1 | 0 |
| 2 | 6 |
| 3 | 5 |
| 4 | 4 |
| 5 | 3 |
| 6 | 2 |
This is a language agnostic problem. I can’t just store the array, and do the lookup. The input will always be the finite set of 0 to 6. It won’t be scaling later.
This:
This is how I arrived at that: