Merge pull request #3469 from ActuallyCurtis/patch-1

CODINGCONTRACT: Typo & clarity fixes to description of Encoded Binary to Integer contract
This commit is contained in:
hydroflame 2022-04-15 09:58:57 -04:00 committed by GitHub
commit f790aa27ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1281,14 +1281,15 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
numTries: 10, numTries: 10,
desc: (n: string): string => { desc: (n: string): string => {
return [ return [
"You are given the following encoded binary String: \n", "You are given the following encoded binary string: \n",
`'${n}' \n`, `'${n}' \n`,
"Treat it as a Hammingcode with 1 'possible' error on an random Index.\n", "The string is a Hamming code with 1 'possible' error on a random index.\n",
"Find the 'possible' wrong bit, fix it and extract the decimal value, which is hidden inside the string.\n\n", "If there is an error, find the bit that is an error and fix it.\n",
"Note: The length of the binary string is dynamic, but it's encoding/decoding is following Hammings 'rule'\n", "Extract the encoded decimal value and return a string with that value.\n\n",
"Note 2: Index 0 is an 'overall' parity bit. Watch the Hammingcode-video from 3Blue1Brown for more information\n", "NOTE: The length of the binary string is dynamic.\n",
"Note 3: There's a ~55% chance for an altered Bit. So... MAYBE there is an altered Bit 😉\n", "NOTE 2: Index 0 is an 'overall' parity bit. Watch the Hamming code video from 3Blue1Brown for more information.\n",
"Extranote for automation: return the decimal value as a string", "NOTE 3: There's approximately a 55% chance for an altered bit. So... MAYBE there is an altered bit 😉\n",
"NOTE 4: Return the decimal value as a string.",
].join(" "); ].join(" ");
}, },
gen: (): string => { gen: (): string => {