fix(challenges): Forgot to remove the space between the function name and first parenthesis
This commit is contained in:
@ -61,7 +61,7 @@ const solution = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100];
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function getFinalOpenedDoors (numDoors) {
|
function getFinalOpenedDoors(numDoors) {
|
||||||
// this is the final pattern (always squares).
|
// this is the final pattern (always squares).
|
||||||
// thus, the most efficient solution simply returns an array of squares up to numDoors).
|
// thus, the most efficient solution simply returns an array of squares up to numDoors).
|
||||||
const finalState = [];
|
const finalState = [];
|
||||||
|
@ -80,7 +80,7 @@ function numberOfNames(num) {
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function numberOfNames (num) {
|
function numberOfNames(num) {
|
||||||
const cache = [
|
const cache = [
|
||||||
[1]
|
[1]
|
||||||
];
|
];
|
||||||
|
@ -96,7 +96,7 @@ const words = ['bark', 'BooK', 'TReAT', 'COMMON', 'squAD', 'conFUSE'];
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function canMakeWord (word) {
|
function canMakeWord(word) {
|
||||||
const characters = 'BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM';
|
const characters = 'BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM';
|
||||||
const blocks = characters.split(' ').map(pair => pair.split(''));
|
const blocks = characters.split(' ').map(pair => pair.split(''));
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ const solution = [15043, 4, 4953];
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function getDPA (num) {
|
function getDPA(num) {
|
||||||
const dpa = [1, 0, 0];
|
const dpa = [1, 0, 0];
|
||||||
for (let n = 2; n <= num; n += 1) {
|
for (let n = 2; n <= num; n += 1) {
|
||||||
let ds = 1;
|
let ds = 1;
|
||||||
|
@ -70,7 +70,7 @@ if (testFn) {
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function accumulator (sum) {
|
function accumulator(sum) {
|
||||||
return function (n) {
|
return function (n) {
|
||||||
return sum += n;
|
return sum += n;
|
||||||
};
|
};
|
||||||
|
@ -59,7 +59,7 @@ function ack(m, n) {
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function ack (m, n) {
|
function ack(m, n) {
|
||||||
return m === 0 ? n + 1 : ack(m - 1, n === 0 ? 1 : ack(m, n - 1));
|
return m === 0 ? n + 1 : ack(m - 1, n === 0 ? 1 : ack(m, n - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ const testArr = [
|
|||||||
|
|
||||||
String.prototype.repeat = function (n) { return new Array(1 + parseInt(n)).join(this); };
|
String.prototype.repeat = function (n) { return new Array(1 + parseInt(n)).join(this); };
|
||||||
|
|
||||||
function formatText (input, justification) {
|
function formatText(input, justification) {
|
||||||
let x, y, max, cols = 0, diff, left, right;
|
let x, y, max, cols = 0, diff, left, right;
|
||||||
for (x = 0; x < input.length; x++) {
|
for (x = 0; x < input.length; x++) {
|
||||||
input[x] = input[x].split('$');
|
input[x] = input[x].split('$');
|
||||||
|
@ -45,7 +45,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function amicablePairsUpTo (maxNum) {
|
function amicablePairsUpTo(maxNum) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ const answer20000 = [
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
// amicablePairsUpTo :: Int -> [(Int, Int)]
|
// amicablePairsUpTo :: Int -> [(Int, Int)]
|
||||||
function amicablePairsUpTo (maxNum) {
|
function amicablePairsUpTo(maxNum) {
|
||||||
return range(1, maxNum)
|
return range(1, maxNum)
|
||||||
.map(x => properDivisors(x)
|
.map(x => properDivisors(x)
|
||||||
.reduce((a, b) => a + b, 0))
|
.reduce((a, b) => a + b, 0))
|
||||||
@ -101,7 +101,7 @@ function amicablePairsUpTo (maxNum) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// properDivisors :: Int -> [Int]
|
// properDivisors :: Int -> [Int]
|
||||||
function properDivisors (n) {
|
function properDivisors(n) {
|
||||||
if (n < 2) return [];
|
if (n < 2) return [];
|
||||||
|
|
||||||
const rRoot = Math.sqrt(n);
|
const rRoot = Math.sqrt(n);
|
||||||
@ -117,7 +117,7 @@ function properDivisors (n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Int -> Int -> Maybe Int -> [Int]
|
// Int -> Int -> Maybe Int -> [Int]
|
||||||
function range (m, n, step) {
|
function range(m, n, step) {
|
||||||
const d = (step || 1) * (n >= m ? 1 : -1);
|
const d = (step || 1) * (n >= m ? 1 : -1);
|
||||||
|
|
||||||
return Array.from({
|
return Array.from({
|
||||||
|
@ -36,7 +36,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function mode (arr) {
|
function mode(arr) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function pythagoreanMeans (rangeArr) {
|
function pythagoreanMeans(rangeArr) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -88,7 +88,7 @@ const answer1 = {
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function pythagoreanMeans (rangeArr) {
|
function pythagoreanMeans(rangeArr) {
|
||||||
// arithmeticMean :: [Number] -> Number
|
// arithmeticMean :: [Number] -> Number
|
||||||
const arithmeticMean = xs =>
|
const arithmeticMean = xs =>
|
||||||
foldl((sum, n) => sum + n, 0, xs) / length(xs);
|
foldl((sum, n) => sum + n, 0, xs) / length(xs);
|
||||||
|
@ -37,7 +37,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function rms (arr) {
|
function rms(arr) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -62,7 +62,7 @@ const answer1 = 6.2048368229954285;
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function rms (arr) {
|
function rms(arr) {
|
||||||
const sumOfSquares = arr.reduce((s, x) => s + x * x, 0);
|
const sumOfSquares = arr.reduce((s, x) => s + x * x, 0);
|
||||||
return Math.sqrt(sumOfSquares / arr.length);
|
return Math.sqrt(sumOfSquares / arr.length);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function babbage (babbageNum, endDigits) {
|
function babbage(babbageNum, endDigits) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ const answer = 25264;
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function babbage (babbageAns, endDigits) {
|
function babbage(babbageAns, endDigits) {
|
||||||
const babbageNum = Math.pow(babbageAns, 2);
|
const babbageNum = Math.pow(babbageAns, 2);
|
||||||
const babbageStartDigits = parseInt(babbageNum.toString().replace('269696', ''));
|
const babbageStartDigits = parseInt(babbageNum.toString().replace('269696', ''));
|
||||||
let answer = 99736;
|
let answer = 99736;
|
||||||
|
@ -78,7 +78,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function isBalanced (str) {
|
function isBalanced(str) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -122,7 +122,7 @@ const testCases = [
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function isBalanced (str) {
|
function isBalanced(str) {
|
||||||
if (str === '') return true;
|
if (str === '') return true;
|
||||||
let a = str;
|
let a = str;
|
||||||
let b;
|
let b;
|
||||||
|
@ -68,7 +68,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function getCircles (...args) {
|
function getCircles(...args) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ const pAng = (p1, p2) => Math.atan(p1.map((e, i) => e - p2[i]).reduce((p, c) =>
|
|||||||
const solveF = (p, r) => t => [parseFloat((r * Math.cos(t) + p[0]).toFixed(4)), parseFloat((r * Math.sin(t) + p[1]).toFixed(4))];
|
const solveF = (p, r) => t => [parseFloat((r * Math.cos(t) + p[0]).toFixed(4)), parseFloat((r * Math.sin(t) + p[1]).toFixed(4))];
|
||||||
const diamPoints = (p1, p2) => p1.map((e, i) => parseFloat((e + (p2[i] - e) / 2).toFixed(4)));
|
const diamPoints = (p1, p2) => p1.map((e, i) => parseFloat((e + (p2[i] - e) / 2).toFixed(4)));
|
||||||
|
|
||||||
function getCircles (...args) {
|
function getCircles(...args) {
|
||||||
const [p1, p2, s] = args;
|
const [p1, p2, s] = args;
|
||||||
const solve = solveF(p1, s);
|
const solve = solveF(p1, s);
|
||||||
const halfDist = hDist(p1, p2);
|
const halfDist = hDist(p1, p2);
|
||||||
|
@ -102,18 +102,18 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const Point = function (x, y) {
|
const Point = function(x, y) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
};
|
};
|
||||||
Point.prototype.getX = function () {
|
Point.prototype.getX = function() {
|
||||||
return this.x;
|
return this.x;
|
||||||
};
|
};
|
||||||
Point.prototype.getY = function () {
|
Point.prototype.getY = function() {
|
||||||
return this.y;
|
return this.y;
|
||||||
};
|
};
|
||||||
|
|
||||||
function getClosestPair (pointsArr) {
|
function getClosestPair(pointsArr) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -238,14 +238,14 @@ const benchmarkPoints = [
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const Point = function (x, y) {
|
const Point = function(x, y) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
};
|
};
|
||||||
Point.prototype.getX = function () {
|
Point.prototype.getX = function() {
|
||||||
return this.x;
|
return this.x;
|
||||||
};
|
};
|
||||||
Point.prototype.getY = function () {
|
Point.prototype.getY = function() {
|
||||||
return this.y;
|
return this.y;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -344,9 +344,9 @@ const closestPair = function _closestPair(Px, Py) {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
function getClosestPair (points) {
|
function getClosestPair(points) {
|
||||||
const sortX = function (a, b) { return (a.x < b.x) ? -1 : ((a.x > b.x) ? 1 : 0); }
|
const sortX = function(a, b) { return (a.x < b.x) ? -1 : ((a.x > b.x) ? 1 : 0); }
|
||||||
const sortY = function (a, b) { return (a.y < b.y) ? -1 : ((a.y > b.y) ? 1 : 0); }
|
const sortY = function(a, b) { return (a.y < b.y) ? -1 : ((a.y > b.y) ? 1 : 0); }
|
||||||
|
|
||||||
const Px = mergeSort(points, sortX);
|
const Px = mergeSort(points, sortX);
|
||||||
const Py = mergeSort(points, sortY);
|
const Py = mergeSort(points, sortY);
|
||||||
|
@ -50,7 +50,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function combinations (m, n) {
|
function combinations(m, n) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ const testOutput2 = [[0, 1, 2, 3], [0, 1, 2, 4], [0, 1, 2, 5], [0, 1, 3, 4], [0,
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function combinations (m, n) {
|
function combinations(m, n) {
|
||||||
const nArr = [...Array(n).keys()];
|
const nArr = [...Array(n).keys()];
|
||||||
|
|
||||||
return (function generateCombinations (size, numArr) {
|
return (function generateCombinations (size, numArr) {
|
||||||
|
@ -57,7 +57,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function quibble (words) {
|
function quibble(words) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ const results = ["{}", "{ABC}", "{ABC and DEF}", "{ABC,DEF,G and H}"];
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function quibble (words) {
|
function quibble(words) {
|
||||||
return "{" +
|
return "{" +
|
||||||
words.slice(0, words.length - 1).join(",") +
|
words.slice(0, words.length - 1).join(",") +
|
||||||
(words.length > 1 ? " and " : "") +
|
(words.length > 1 ? " and " : "") +
|
||||||
|
@ -58,12 +58,12 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function allEqual (arr) {
|
function allEqual(arr) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function azSorted (arr) {
|
function azSorted(arr) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function convertSeconds (sec) {
|
function convertSeconds(sec) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ const results = ['2 hr, 59 sec', '1 d', '9 wk, 6 d, 10 hr, 40 min'];
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function convertSeconds (sec) {
|
function convertSeconds(sec) {
|
||||||
const localNames = ['wk', 'd', 'hr', 'min', 'sec'];
|
const localNames = ['wk', 'd', 'hr', 'min', 'sec'];
|
||||||
// compoundDuration :: [String] -> Int -> String
|
// compoundDuration :: [String] -> Int -> String
|
||||||
const compoundDuration = (labels, intSeconds) =>
|
const compoundDuration = (labels, intSeconds) =>
|
||||||
|
@ -46,7 +46,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function countSubstring (str, subStr) {
|
function countSubstring(str, subStr) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function countCoins () {
|
function countCoins() {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ function countCoins () {
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function countCoins () {
|
function countCoins() {
|
||||||
let t = 100;
|
let t = 100;
|
||||||
const operands = [1, 5, 10, 25];
|
const operands = [1, 5, 10, 25];
|
||||||
const targetsLength = t + 1;
|
const targetsLength = t + 1;
|
||||||
|
@ -59,7 +59,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function cramersRule (matrix, freeTerms) {
|
function cramersRule(matrix, freeTerms) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function standardDeviation (arr) {
|
function standardDeviation(arr) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -54,7 +54,7 @@ function standardDeviation (arr) {
|
|||||||
<section id='solution'>
|
<section id='solution'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function standardDeviation (arr) {
|
function standardDeviation(arr) {
|
||||||
var sum = 0,
|
var sum = 0,
|
||||||
sum_sq = 0,
|
sum_sq = 0,
|
||||||
n = arr.length;
|
n = arr.length;
|
||||||
|
@ -49,7 +49,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function isCusip (s) {
|
function isCusip(s) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -61,7 +61,7 @@ function isCusip (s) {
|
|||||||
<section id='solution'>
|
<section id='solution'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function isCusip (s) {
|
function isCusip(s) {
|
||||||
if (s.length != 9) return false;
|
if (s.length != 9) return false;
|
||||||
var sum = 0;
|
var sum = 0;
|
||||||
var ASCII = x => x.charCodeAt(0);
|
var ASCII = x => x.charCodeAt(0);
|
||||||
|
@ -48,7 +48,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function cutRectangle (w, h) {
|
function cutRectangle(w, h) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -60,7 +60,7 @@ function cutRectangle (w, h) {
|
|||||||
<section id='solution'>
|
<section id='solution'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function cutRectangle (w, h) {
|
function cutRectangle(w, h) {
|
||||||
if (w % 2 == 1 && h % 2 == 1)
|
if (w % 2 == 1 && h % 2 == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function getDateFormats () {
|
function getDateFormats() {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ const equalsMessage = `message: <code>getDataFormats()</code> should return <cod
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function getDateFormats () {
|
function getDateFormats() {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
||||||
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
||||||
|
@ -46,7 +46,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function add12Hours (dateString) {
|
function add12Hours(dateString) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ function add12Hours (dateString) {
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function add12Hours (dateString) {
|
function add12Hours(dateString) {
|
||||||
const months = ['January', 'February', 'March', 'April', 'May', 'June',
|
const months = ['January', 'February', 'March', 'April', 'May', 'June',
|
||||||
'July', 'August', 'September', 'October', 'November', 'December'];
|
'July', 'August', 'September', 'October', 'November', 'December'];
|
||||||
// Get the parts of the string
|
// Get the parts of the string
|
||||||
|
@ -39,7 +39,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function findXmasSunday (start, end) {
|
function findXmasSunday(start, end) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ const secondSolution = [2011, 2016, 2022, 2033, 2039, 2044, 2050, 2061, 2067, 20
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function findXmasSunday (start, end) {
|
function findXmasSunday(start, end) {
|
||||||
const xmasSunday = [];
|
const xmasSunday = [];
|
||||||
for (let year = start; year <= end; year++) {
|
for (let year = start; year <= end; year++) {
|
||||||
const xmas = new Date(year, 11, 25);
|
const xmas = new Date(year, 11, 25);
|
||||||
|
@ -91,7 +91,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function dealFreeCell (seed) {
|
function dealFreeCell(seed) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ const game617 = [
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
// RNG
|
// RNG
|
||||||
function FreeCellRNG (seed) {
|
function FreeCellRNG(seed) {
|
||||||
return {
|
return {
|
||||||
lastNum: seed,
|
lastNum: seed,
|
||||||
next() {
|
next() {
|
||||||
|
@ -47,7 +47,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function deepcopy (obj) {
|
function deepcopy(obj) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function Num (n) {
|
function Num(n) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user