fix(euler): Fixed broken build

This commit is contained in:
Mrugesh Mohapatra
2018-01-12 04:09:37 +05:30
parent 36612f023a
commit 3b291b26ef
2 changed files with 7 additions and 5 deletions

View File

@ -98,7 +98,7 @@
"assert.strictEqual(largestPalindromeProduct(3), 906609, 'message: <code>largestPalindromeProduct(3)</code> should return 906609.');"
],
"solutions": [
"const largestPalindromeProduct = (digit)=>{\n let start = 1;\n let end = Number(`1e${digit}`) - 1;\n let palindrome = [];\n for(let i=start;i<=end;i++){\n for(let j=start;j<=end;j++){\n let product = i*j;\n let palindromeRegex = new RegExp('\\b(\\d)(\\d?)(\\d?).?\\3\\2\\1\\b','gi');\n palindromeRegex.test(product) && palindrome.push(product);\n }\n }\n return Math.max(...palindrome);\n}"
"const largestPalindromeProduct = (digit)=>{\n let start = 1;\n let end = Number(`1e${digit}`) - 1;\n let palindrome = [];\n for(let i=start;i<=end;i++){\n for(let j=start;j<=end;j++){\n let product = i*j;\n let palindromeRegex = /\\b(\\d)(\\d?)(\\d?).?\\3\\2\\1\\b/gi;\n palindromeRegex.test(product) && palindrome.push(product);\n }\n }\n return Math.max(...palindrome);\n}"
],
"translations": {},
"challengeSeed": [

View File

@ -215,10 +215,12 @@ Observable.from(getChallenges())
.toArray()
.subscribe(
(noSolutions) => {
if(noSolutions){
console.log(
'# These challenges have no solutions\n- [ ] ' +
noSolutions.join('\n- [ ] ')
);
}
},
err => { throw err; },
() => process.exit(0)