HammingCodingContracts need rework

This commit is contained in:
H3draut3r 2022-04-16 18:30:38 +02:00
parent 0fda1ecabf
commit 2d0cccfa3f

@ -1,7 +1,7 @@
import { getRandomInt } from "../utils/helpers/getRandomInt"; import { getRandomInt } from "../utils/helpers/getRandomInt";
import { MinHeap } from "../utils/Heap"; import { MinHeap } from "../utils/Heap";
import { HammingEncode, HammingDecode } from "../utils/HammingCodeTools"; // import { HammingEncode, HammingDecode } from "../utils/HammingCodeTools";
/* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */ /* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */
/* Function that generates a valid 'data' for a contract type */ /* Function that generates a valid 'data' for a contract type */
@ -1247,7 +1247,7 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
return true; return true;
}, },
}, } /*
{ {
name: "HammingCodes: Integer to encoded Binary", name: "HammingCodes: Integer to encoded Binary",
numTries: 10, numTries: 10,
@ -1305,5 +1305,5 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
solver: (data: string, ans: string): boolean => { solver: (data: string, ans: string): boolean => {
return parseInt(ans, 10) === HammingDecode(data); return parseInt(ans, 10) === HammingDecode(data);
}, },
}, },*/,
]; ];