Find the missing permutation: Difference between revisions
Content added Content deleted
(→{{header|Lua}}: shortened) |
m (rearranged the placement of the permutation list, added bullet points for the three methods, added whitespace and highlighting to the task's preamble, added a ;Related task: (bold) header, changed verb tense.) |
||
Line 1: | Line 1: | ||
{{task}} |
{{task}} |
||
These are all of the permutations of the symbols A, B, C and D, |
|||
except for one that's not listed. |
|||
⚫ | |||
⚫ | |||
There is an obvious method : |
|||
enumerating all permutations of A, B, C, D, and looking for the missing one. |
|||
⚫ | |||
⚫ | |||
ABCD |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
CABD |
CABD |
||
ACDB |
ACDB |
||
Line 40: | Line 24: | ||
CBDA |
CBDA |
||
DBCA |
DBCA |
||
DCAB |
DCAB |
||
</pre> |
|||
Listed above are all of the permutations of the symbols '''A''', '''B''', '''C''', and '''D''', ''except'' for one permutation that's ''not'' listed. |
|||
;Task: |
|||
⚫ | |||
;Methods: |
|||
* Obvious method: |
|||
enumerate all permutations of '''A''', '''B''', '''C''', and '''D''', |
|||
and then look for the missing permutation. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
does a missing letter '''A''', '''B''', '''C''', and '''D''' from each |
|||
⚫ | |||
;Related task: |
|||
⚫ | |||
<br><br> |
|||
=={{header|360 Assembly}}== |
=={{header|360 Assembly}}== |