From f962d7774aec52993aa9bf14bf73d4521adb5795 Mon Sep 17 00:00:00 2001 From: Stuart Taylor Date: Fri, 18 May 2018 14:54:21 +0100 Subject: [PATCH] Merge pull request #45 from Bouncey/fix/ui Fix up the UI and pull in the latest seed files --- packages/learn/.babelrc | 10 +- packages/learn/gatsby-node.js | 21 +- packages/learn/package.json | 1 + .../fcc-source-challenges/gatsby-node.js | 2 +- .../applied-accessibility.json | 137 +- .../applied-visual-design.json | 333 +- .../01-responsive-web-design/basic-css.json | 265 +- .../basic-html-and-html5.json | 185 +- .../01-responsive-web-design/css-flexbox.json | 107 +- .../01-responsive-web-design/css-grid.json | 143 +- .../responsive-web-design-projects.json | 97 +- .../responsive-web-design.json | 29 +- .../basic-algorithm-scripting.json | 72 +- .../basic-data-structures.json | 85 +- .../basic-javascript.json | 806 +- .../debugging.json | 55 +- .../es6.json | 159 +- .../functional-programming.json | 99 +- .../intermediate-algorithm-scripting.json | 89 +- ...gorithms-and-data-structures-projects.json | 25 +- .../object-oriented-programming.json | 116 +- .../regular-expressions.json | 135 +- .../03-front-end-libraries/bootstrap.json | 225 +- .../front-end-libraries-projects.json | 99 +- .../03-front-end-libraries/jquery.json | 115 +- .../react-and-redux.json | 49 +- .../03-front-end-libraries/react.json | 282 +- .../03-front-end-libraries/redux.json | 72 +- .../03-front-end-libraries/sass.json | 81 +- .../data-visualization-projects.json | 5 +- .../data-visualization-with-d3.json | 179 +- .../json-apis-and-ajax.json | 59 +- ...n => apis-and-microservices-projects.json} | 17 +- .../basic-node-and-express.json | 7 +- .../managing-packages-with-npm.json | 5 +- .../mongodb-and-mongoose.json | 9 +- .../advanced-express-tools.json | 27 +- .../helmetjs.json | 7 +- ...nce-and-information-security-projects.json | 17 +- .../testing-with-chai.json | 21 +- .../08-coding-interview-prep/algorithms.json | 82 +- .../data-structures.json | 768 +- .../project-euler-guide.md | 249 + .../project-euler.json | 8210 +++-------------- .../rosetta-code.json | 1117 ++- .../apis-and-microservices-certificate.json | 37 + .../data-visualization-certificate.json | 37 + .../front-end-libraries-certificate.json | 37 + ...ity-and-quality-assurance-certificate.json | 37 + ...ithms-and-data-structures-certificate.json | 37 + .../legacy-back-end-certificate.json | 57 + ...legacy-data-visualization-certificate.json | 57 + .../legacy-front-end-certificate.json | 57 + .../responsive-web-design-certificate.json | 37 + .../src/{pages => auth}/auth-callback.js | 3 + .../learn/src/components/Header/header.css | 45 +- packages/learn/src/components/Header/index.js | 26 +- packages/learn/src/components/Map/Map.js | 10 +- .../Map/__snapshots__/Map.test.js.snap | 434 +- packages/learn/src/components/Map/map.css | 6 +- .../learn/src/components/MapModal/index.js | 52 + .../src/components/MapModal/map-modal.css | 3 + .../components/formHelpers/BlockSaveButton.js | 2 +- .../learn/src/components/formHelpers/Form.js | 6 +- .../src/components/formHelpers/FormFields.js | 15 +- .../BlockSaveButton.test.js.snap | 2 +- .../__snapshots__/Form.test.js.snap | 9 +- .../formHelpers/form-fields.css} | 6 +- .../apis-and-microservices-projects/index.md | 10 + .../data-visualization-projects/index.md | 10 + .../front-end-libraries-projects/index.md | 10 + .../index.md | 10 + .../index.md | 10 + .../responsive-web-design-projects/index.md | 10 + packages/learn/src/layouts/global.css | 19 +- packages/learn/src/layouts/index.js | 27 +- packages/learn/src/layouts/layout.css | 3 +- packages/learn/src/pages/index.css | 5 +- packages/learn/src/pages/index.js | 30 +- packages/learn/src/pages/strange-place.js | 34 - packages/learn/src/redux/app/index.js | 44 +- .../src/templates/Challenges/backend/Show.js | 25 +- .../src/templates/Challenges/classic/Show.js | 63 +- .../templates/Challenges/classic/classic.css | 12 +- .../components/Challenge-Description.js | 2 + .../Challenges/components/CompletionModal.js | 22 +- .../Challenges/components/HelpModal.js | 12 +- .../templates/Challenges/components/Output.js | 5 +- .../Challenges/components/ResetModal.js | 10 +- .../Challenges/components/Side-Panel.js | 85 +- .../Challenges/components/Tool-Panel.js | 74 +- .../components/challenge-description.css | 14 + .../components/completion-modal.css | 12 + .../Challenges/components/preview.css | 2 +- .../Challenges/components/reset-modal.css | 11 + .../Challenges/components/tool-panel.css | 12 + .../src/templates/Challenges/project/Show.js | 35 +- .../Challenges/project/Side-Panel.js | 2 + .../Challenges/project/Tool-Panel.js | 74 +- .../templates/Challenges/project/project.css | 8 + .../Challenges/rechallenge/builders.js | 4 +- .../redux/execute-challenge-epic.js | 4 +- .../src/templates/Challenges/utils/frame.js | 8 +- .../learn/src/templates/Introduction/Intro.js | 10 +- packages/learn/yarn.lock | 37 +- 105 files changed, 7019 insertions(+), 9431 deletions(-) rename packages/learn/seed/challenges/05-apis-and-microservices/{api-and-microservice-projects.json => apis-and-microservices-projects.json} (93%) create mode 100644 packages/learn/seed/challenges/08-coding-interview-prep/project-euler-guide.md create mode 100644 packages/learn/seed/challenges/09-certificates/apis-and-microservices-certificate.json create mode 100644 packages/learn/seed/challenges/09-certificates/data-visualization-certificate.json create mode 100644 packages/learn/seed/challenges/09-certificates/front-end-libraries-certificate.json create mode 100644 packages/learn/seed/challenges/09-certificates/information-security-and-quality-assurance-certificate.json create mode 100644 packages/learn/seed/challenges/09-certificates/javascript-algorithms-and-data-structures-certificate.json create mode 100644 packages/learn/seed/challenges/09-certificates/legacy-back-end-certificate.json create mode 100644 packages/learn/seed/challenges/09-certificates/legacy-data-visualization-certificate.json create mode 100644 packages/learn/seed/challenges/09-certificates/legacy-front-end-certificate.json create mode 100644 packages/learn/seed/challenges/09-certificates/responsive-web-design-certificate.json rename packages/learn/src/{pages => auth}/auth-callback.js (93%) create mode 100644 packages/learn/src/components/MapModal/index.js create mode 100644 packages/learn/src/components/MapModal/map-modal.css rename packages/learn/src/{pages/strange-place.css => components/formHelpers/form-fields.css} (51%) create mode 100644 packages/learn/src/introductions/apis-and-microservices/apis-and-microservices-projects/index.md create mode 100644 packages/learn/src/introductions/data-visualization/data-visualization-projects/index.md create mode 100644 packages/learn/src/introductions/front-end-libraries/front-end-libraries-projects/index.md create mode 100644 packages/learn/src/introductions/information-security-and-quality-assurance/information-security-and-quality-assurance-projects/index.md create mode 100644 packages/learn/src/introductions/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/index.md create mode 100644 packages/learn/src/introductions/responsive-web-design/responsive-web-design-projects/index.md delete mode 100644 packages/learn/src/pages/strange-place.js create mode 100644 packages/learn/src/templates/Challenges/components/challenge-description.css create mode 100644 packages/learn/src/templates/Challenges/components/completion-modal.css create mode 100644 packages/learn/src/templates/Challenges/components/reset-modal.css create mode 100644 packages/learn/src/templates/Challenges/components/tool-panel.css create mode 100644 packages/learn/src/templates/Challenges/project/project.css diff --git a/packages/learn/.babelrc b/packages/learn/.babelrc index 8c26d903fa..927f66e379 100644 --- a/packages/learn/.babelrc +++ b/packages/learn/.babelrc @@ -4,6 +4,14 @@ "react" ], "plugins": [ - "add-module-exports" + "add-module-exports", + [ + "transform-imports", { + "react-bootstrap": { + "transform": "react-bootstrap/lib/${member}", + "preventFullImport": true + } + } + ] ] } \ No newline at end of file diff --git a/packages/learn/gatsby-node.js b/packages/learn/gatsby-node.js index 62003d0d6c..65708235c4 100644 --- a/packages/learn/gatsby-node.js +++ b/packages/learn/gatsby-node.js @@ -38,7 +38,7 @@ exports.createPages = ({ graphql, boundActionCreators }) => { const { createPage } = boundActionCreators; return new Promise((resolve, reject) => { - // Query for all markdown "nodes" and for the slug we previously created. + // Query for all markdown 'nodes' and for the slug we previously created. resolve( graphql(` { @@ -140,3 +140,22 @@ exports.modifyWebpackConfig = ({ config, stage }) => { ]); }); }; +/* eslint-disable prefer-object-spread/prefer-object-spread */ +exports.modifyBabelrc = ({ babelrc }) => + Object.assign({}, babelrc, { + plugins: babelrc.plugins.concat([ + [ + 'transform-imports', + { + 'react-bootstrap': { + transform: 'react-bootstrap/lib/${member}', + preventFullImport: true + }, + lodash: { + transform: 'lodash/${member}', + preventFullImport: true + } + } + ] + ]) + }); diff --git a/packages/learn/package.json b/packages/learn/package.json index 5b625c7056..2d8e0a6076 100644 --- a/packages/learn/package.json +++ b/packages/learn/package.json @@ -8,6 +8,7 @@ "auth0-js": "^9.5.1", "babel-core": "^6.26.0", "babel-jest": "^22.4.3", + "babel-plugin-transform-imports": "^1.5.0", "babel-standalone": "^6.26.0", "brace": "^0.11.1", "chai": "^4.1.2", diff --git a/packages/learn/plugins/fcc-source-challenges/gatsby-node.js b/packages/learn/plugins/fcc-source-challenges/gatsby-node.js index da7fd952b8..4da43b2fbe 100644 --- a/packages/learn/plugins/fcc-source-challenges/gatsby-node.js +++ b/packages/learn/plugins/fcc-source-challenges/gatsby-node.js @@ -45,7 +45,7 @@ that delivers challenge files to the plugin const { source } = pluginOptions; const createAndProcessNodes = () => source() - .filter(node => node.challengeType !== 7) + .filter(nodes => nodes.some(node => node.superBlock !== 'Certificates')) .map(nodes => nodes.map(node => createChallengeNodes(node, reporter))) .map(nodes => nodes.map(node => createNode(node))) .subscribe(); diff --git a/packages/learn/seed/challenges/01-responsive-web-design/applied-accessibility.json b/packages/learn/seed/challenges/01-responsive-web-design/applied-accessibility.json index 9e3f94504e..ad12e3bbf5 100644 --- a/packages/learn/seed/challenges/01-responsive-web-design/applied-accessibility.json +++ b/packages/learn/seed/challenges/01-responsive-web-design/applied-accessibility.json @@ -29,15 +29,15 @@ "translations": {}, "guideUrl": "https://guide.freecodecamp.org/certificates/add-alt-text-to-an-image-for-accessibility", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", "contents": [ "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -70,7 +70,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -88,8 +88,8 @@ "

To Come...

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -125,7 +125,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -145,8 +145,8 @@ "
How to Simplify your Life
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -178,7 +178,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -191,8 +191,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -225,7 +225,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -252,8 +252,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -292,7 +292,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -323,8 +323,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -362,7 +362,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -399,8 +399,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -437,7 +437,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -477,8 +477,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -532,7 +532,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -549,8 +549,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -598,7 +598,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -645,8 +645,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -679,7 +679,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -717,8 +717,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -763,7 +763,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -812,8 +812,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -854,7 +854,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -883,8 +883,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -923,7 +923,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -960,8 +960,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1006,7 +1006,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1096,8 +1096,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1127,7 +1127,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1151,8 +1151,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1184,7 +1184,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1208,8 +1208,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1236,7 +1236,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1258,8 +1258,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1289,7 +1289,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1304,8 +1304,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1345,7 +1345,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1373,8 +1373,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1406,7 +1406,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1459,8 +1459,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1502,7 +1502,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1539,13 +1539,10 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "01-responsive-web-design/applied-accessibility.json", - "superBlock": "responsive-web-design", - "superOrder": 1 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/01-responsive-web-design/applied-visual-design.json b/packages/learn/seed/challenges/01-responsive-web-design/applied-visual-design.json index d641b5c617..333b6e3e8e 100644 --- a/packages/learn/seed/challenges/01-responsive-web-design/applied-visual-design.json +++ b/packages/learn/seed/challenges/01-responsive-web-design/applied-visual-design.json @@ -34,7 +34,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -73,8 +73,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -100,7 +100,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -140,8 +140,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -167,7 +167,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -208,8 +208,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -242,7 +242,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -286,8 +286,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -321,7 +321,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -365,8 +365,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -376,7 +376,7 @@ "description": [ "To emphasize text, you can use the em tag. This displays text as italicized, as the browser applies the CSS of font-style: italic; to the element.", "
", - "Wrap an em tag around the paragraph tag to give it emphasis." + "Wrap an em tag around the contents of the paragraph tag to give it emphasis." ], "tests": [ { @@ -384,8 +384,8 @@ "testString": "assert($('em').length == 1, 'Your code should add an em tag to the markup.');" }, { - "text": "The em tag should wrap around the p tag and its contents.", - "testString": "assert($('em').children('p').length == 1, 'The em tag should wrap around the p tag and its contents.');" + "text": "The em tag should wrap around the contents of the p tag but not the p tag itself.", + "testString": "assert($('p').children().length == 1 && $('em').children().length == 2, 'The em tag should wrap around the contents of the p tag but not the p tag itself.');" } ], "solutions": [], @@ -395,7 +395,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -439,8 +439,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -473,7 +473,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -517,8 +517,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -548,7 +548,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -593,8 +593,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -631,7 +631,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -678,8 +678,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -704,7 +704,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -751,8 +751,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -784,7 +784,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -834,8 +834,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -862,7 +862,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -913,8 +913,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -945,7 +945,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -997,8 +997,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1043,7 +1043,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1063,8 +1063,8 @@ "
This is h5 text
", "
This is h6 text
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1110,7 +1110,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1148,8 +1148,8 @@ "
This is h5 text
", "
This is h6 text
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1174,7 +1174,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1188,8 +1188,8 @@ " Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.", "

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1214,7 +1214,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1229,8 +1229,8 @@ " Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.", "

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1261,7 +1261,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1276,8 +1276,8 @@ "", "CatPhotoApp" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1310,7 +1310,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1327,8 +1327,8 @@ "

I still think the h2 is where it normally sits.

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1358,7 +1358,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1378,8 +1378,8 @@ "

I still think the h2 is where it normally sits.

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1390,7 +1390,7 @@ "The next option for the CSS position property is absolute, which locks the element in place relative to its parent container. Unlike the relative position, this removes the element from the normal flow of the document, so surrounding items ignore it. The CSS offset properties (top or bottom and left or right) are used to adjust the position.", "One nuance with absolute positioning is that it will be locked relative to its closest positioned ancestor. If you forget to add a position rule to the parent item, (this is typically done using position: relative;), the browser will keep looking up the chain and ultimately default to the body tag.", "
", - "Lock the #searchbar element to the top-right of its section parent by declaring its position as absolute. Give it top and right offsets of 0.5 pixels each." + "Lock the #searchbar element to the top-right of its section parent by declaring its position as absolute. Give it top and right offsets of 50 pixels each." ], "tests": [ { @@ -1398,12 +1398,12 @@ "testString": "assert($('#searchbar').css('position') == 'absolute', 'The #searchbar element should have a position set to absolute.');" }, { - "text": "Your code should use the top CSS offset of 0.5 pixels on the #searchbar element.", - "testString": "assert($('#searchbar').css('top') == '0.5px', 'Your code should use the top CSS offset of 0.5 pixels on the #searchbar element.');" + "text": "Your code should use the top CSS offset of 50 pixels on the #searchbar element.", + "testString": "assert($('#searchbar').css('top') == '50px', 'Your code should use the top CSS offset of 50 pixels on the #searchbar element.');" }, { - "text": "Your code should use the right CSS offset of 0.5 pixels on the #searchbar element.", - "testString": "assert($('#searchbar').css('right') == '0.5px', 'Your code should use the right CSS offset of 0.5 pixels on the #searchbar element.');" + "text": "Your code should use the right CSS offset of 50 pixels on the #searchbar element.", + "testString": "assert($('#searchbar').css('right') == '50px', 'Your code should use the right CSS offset of 50 pixels on the #searchbar element.');" } ], "solutions": [], @@ -1413,7 +1413,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1439,8 +1439,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1474,7 +1474,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1512,8 +1512,8 @@ "

I shift up when the #navbar is fixed to the browser window.

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1542,7 +1542,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1577,8 +1577,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1603,7 +1603,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1632,8 +1632,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1659,7 +1659,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1674,8 +1674,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1709,7 +1709,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1733,8 +1733,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1771,7 +1771,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1804,8 +1804,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1842,7 +1842,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1886,8 +1886,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1937,7 +1937,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1970,8 +1970,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1996,7 +1996,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2043,8 +2043,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2074,7 +2074,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2093,8 +2093,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2144,7 +2144,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2169,8 +2169,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2197,7 +2197,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2208,8 +2208,8 @@ " }", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2235,7 +2235,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2267,8 +2267,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2297,7 +2297,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2320,8 +2320,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2350,7 +2350,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2373,8 +2373,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2399,7 +2399,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2423,8 +2423,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2460,7 +2460,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2485,8 +2485,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2528,7 +2528,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2569,8 +2569,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2622,7 +2622,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2647,8 +2647,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2680,7 +2680,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2703,8 +2703,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2730,7 +2730,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2757,8 +2757,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2793,7 +2793,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2834,8 +2834,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2861,7 +2861,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2895,8 +2895,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2923,7 +2923,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2962,8 +2962,8 @@ "", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2993,7 +2993,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3068,8 +3068,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3097,7 +3097,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3155,8 +3155,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3190,7 +3190,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3249,8 +3249,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3280,7 +3280,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3325,8 +3325,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3359,7 +3359,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3404,8 +3404,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3441,7 +3441,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3479,8 +3479,8 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3509,7 +3509,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3552,13 +3552,10 @@ "
", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "01-responsive-web-design/applied-visual-design.json", - "superBlock": "responsive-web-design", - "superOrder": 1 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/01-responsive-web-design/basic-css.json b/packages/learn/seed/challenges/01-responsive-web-design/basic-css.json index f14d60a60a..6ee6664b1d 100644 --- a/packages/learn/seed/challenges/01-responsive-web-design/basic-css.json +++ b/packages/learn/seed/challenges/01-responsive-web-design/basic-css.json @@ -79,7 +79,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -116,8 +116,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -223,7 +223,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -260,8 +260,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -366,7 +366,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -409,8 +409,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -496,7 +496,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -539,8 +539,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -601,7 +601,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -644,8 +644,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -711,7 +711,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -758,8 +758,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -846,7 +846,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -894,8 +894,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -981,7 +981,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1034,8 +1034,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1111,7 +1111,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1164,8 +1164,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1262,7 +1262,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/add-borders-around-your-elements", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1319,8 +1319,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1385,7 +1385,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/add-rounded-corners-a-border-radius", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1448,8 +1448,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1508,7 +1508,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1572,8 +1572,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1644,7 +1644,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1708,8 +1708,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1784,7 +1784,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1852,8 +1852,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1938,7 +1938,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2006,8 +2006,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2087,7 +2087,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/adjust-the-padding-of-an-element", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2129,8 +2129,8 @@ "
padding
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2196,7 +2196,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/adjust-the-margin-of-an-element", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2240,8 +2240,8 @@ "
padding
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2307,7 +2307,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/add-a-negative-margin-to-an-element", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2350,8 +2350,8 @@ "
padding
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2424,7 +2424,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/add-different-padding-to-each-side-of-an-element", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2468,8 +2468,8 @@ "
padding
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2541,7 +2541,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2585,8 +2585,8 @@ "
padding
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2667,7 +2667,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2708,8 +2708,8 @@ "
padding
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2791,7 +2791,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2832,8 +2832,8 @@ "
padding
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2869,7 +2869,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2937,8 +2937,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2967,7 +2967,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3008,8 +3008,8 @@ "
padding
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3089,7 +3089,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3098,8 +3098,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3193,7 +3193,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3205,8 +3205,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3282,7 +3282,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3296,8 +3296,8 @@ "", "

Hello World!

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3394,7 +3394,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3411,8 +3411,8 @@ "", "

Hello World!

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3524,7 +3524,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3544,8 +3544,8 @@ "", "

Hello World!

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3631,7 +3631,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3654,8 +3654,8 @@ "", "

Hello World!

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3755,7 +3755,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3778,8 +3778,8 @@ "", "

Hello World!

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3849,7 +3849,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3860,8 +3860,8 @@ " }", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3953,7 +3953,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3981,8 +3981,8 @@ "", "

I am orange!

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4076,7 +4076,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -4104,8 +4104,8 @@ "", "

I am green!

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4196,7 +4196,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -4207,8 +4207,8 @@ " }", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4292,7 +4292,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -4320,8 +4320,8 @@ "", "

I am blue!

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4355,7 +4355,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -4561,8 +4561,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4590,7 +4590,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -4793,8 +4793,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4834,7 +4834,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -5050,8 +5050,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5084,7 +5084,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -5294,8 +5294,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5303,7 +5303,7 @@ "id": "5a9d7295424fe3d0e10cad14", "title": "Cascading CSS variables", "description": [ - "When you create a variable, it is becomes available for you to use inside the element in which you create it. It also becomes available within any elements nested within it. This effect is known as cascading.", + "When you create a variable, it becomes available for you to use inside the element in which you create it. It also becomes available within any elements nested within it. This effect is known as cascading.", "Because of cascading, CSS variables are often defined in the :root element.", "You can think of the :root element as a container for your entire HTML document, in the same way that an html element is a container for the body element.", "By creating your variables in :root, they will be available throughout the whole web page.", @@ -5323,7 +5323,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -5531,8 +5531,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5558,7 +5558,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -5768,8 +5768,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5799,7 +5799,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -6035,13 +6035,10 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "01-responsive-web-design/basic-css.json", - "superBlock": "responsive-web-design", - "superOrder": 1 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/01-responsive-web-design/basic-html-and-html5.json b/packages/learn/seed/challenges/01-responsive-web-design/basic-html-and-html5.json index 234e7d44c0..545283d7da 100644 --- a/packages/learn/seed/challenges/01-responsive-web-design/basic-html-and-html5.json +++ b/packages/learn/seed/challenges/01-responsive-web-design/basic-html-and-html5.json @@ -101,15 +101,15 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", "contents": [ "

Hello

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -189,15 +189,15 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", "contents": [ "

Hello World

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -269,7 +269,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -277,8 +277,8 @@ "

Hello World

", "

CatPhotoApp

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -342,7 +342,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -353,8 +353,8 @@ "", "

Hello Paragraph

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -362,7 +362,7 @@ "id": "bad87fee1348bd9aedf08802", "title": "Uncomment HTML", "description": [ - "Commenting is a way that you can leave comments for other developers within your code without affecting the resulting output that is displayed the the end user.", + "Commenting is a way that you can leave comments for other developers within your code without affecting the resulting output that is displayed the end user.", "Commenting is also a convenient way to make code inactive without having to delete it entirely.", "Comments in HTML starts with <!--, and ends with a -->", "
", @@ -430,7 +430,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -443,8 +443,8 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "-->" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -519,7 +519,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -532,8 +532,8 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "-->" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -600,7 +600,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -611,8 +611,8 @@ "", "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -675,7 +675,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -684,8 +684,8 @@ "", "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -695,13 +695,13 @@ "description": [ "You can add images to your website by using the img element, and point to a specific image's URL using the src attribute.", "An example of this would be:", - "<img src=\"https://www.your-image-source.com/your-image.jpg\" />", - "Note that in most cases, img elements are self-closing.", + "<img src=\"https://www.your-image-source.com/your-image.jpg\">", + "Note that img elements are self-closing.", "All img elements must have an alt attribute. The text inside an alt attribute is used for screen readers to improve accessibility and is displayed if the image fails to load.", "Note: If the image is purely decorative, using an empty alt attribute is a best practice.", "Ideally the alt attribute should not contain special characters unless needed.", "Let's add an alt attribute to our img example above:", - "<img src=\"https://www.your-image-source.com/your-image.jpg\" alt=\"Author standing on a beach with two thumbs up.\" />", + "<img src=\"https://www.your-image-source.com/your-image.jpg\" alt=\"Author standing on a beach with two thumbs up.\">", "
", "Let's try to add an image to our website:", "Insert an img tag, before the h2 element.", @@ -783,7 +783,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/add-images-to-your-website", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -796,8 +796,8 @@ "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -850,7 +850,7 @@ "He aquí un ejemplo:", "<p>Aquí está un <a href=\"https://freecodecamp.org\"> enlace a freeCodeCamp</a> para que lo sigas.</p>", "
", - "Crea un elemento a que se vincule a http://freecatphotoapp.com y tenga como texto de ancla \"fotos de gatos\"." + "Crea un elemento a que se vincule a http://freecatphotoapp.com y tenga como texto de ancla \"cat photos\"." ] }, "pt-br": { @@ -879,7 +879,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -895,8 +895,8 @@ "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -961,7 +961,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -982,8 +982,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1089,7 +1089,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1105,8 +1105,8 @@ "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1167,7 +1167,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1182,8 +1182,8 @@ "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1263,7 +1263,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1278,8 +1278,8 @@ "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1366,7 +1366,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1381,8 +1381,8 @@ "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1489,7 +1489,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1510,8 +1510,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1522,7 +1522,7 @@ "Now let's create a web form.", "Input elements are a convenient way to get input from your user.", "You can create a text input like this:", - "<input type=\"text\" />", + "<input type=\"text\">", "Note that input elements are self-closing.", "
", "Create an input element of type text below your lists." @@ -1586,7 +1586,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1613,8 +1613,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1688,7 +1688,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/add-placeholder-text-to-a-text-field", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1714,8 +1714,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1788,7 +1788,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1814,8 +1814,8 @@ " ", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1893,7 +1893,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/add-a-submit-button-to-a-form", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1921,8 +1921,8 @@ " ", "
" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1991,7 +1991,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2020,8 +2020,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2127,7 +2127,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2156,8 +2156,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2249,7 +2249,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2280,8 +2280,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2350,7 +2350,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2384,8 +2384,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2467,7 +2467,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2502,8 +2502,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2554,17 +2554,13 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", - "contents": [ - "", - "", - "" - ], - "head": "", - "tail": "" + "contents": [], + "head": [], + "tail": [] } } }, @@ -2621,7 +2617,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2635,13 +2631,10 @@ " ", " " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "01-responsive-web-design/basic-html-and-html5.json", - "superBlock": "responsive-web-design", - "superOrder": 1 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/01-responsive-web-design/css-flexbox.json b/packages/learn/seed/challenges/01-responsive-web-design/css-flexbox.json index 0cbe209cf4..80e384a51d 100644 --- a/packages/learn/seed/challenges/01-responsive-web-design/css-flexbox.json +++ b/packages/learn/seed/challenges/01-responsive-web-design/css-flexbox.json @@ -26,7 +26,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -56,8 +56,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -107,7 +107,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -202,8 +202,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -230,7 +230,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -259,8 +259,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -289,7 +289,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -386,8 +386,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -412,7 +412,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -441,8 +441,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -467,7 +467,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -561,8 +561,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -592,7 +592,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -622,8 +622,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -648,7 +648,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -743,8 +743,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -774,7 +774,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -804,8 +804,8 @@ "

Goodbye

", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -838,7 +838,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -935,8 +935,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -964,7 +964,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1018,8 +1018,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1050,7 +1050,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1080,8 +1080,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1111,7 +1111,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1140,8 +1140,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1179,7 +1179,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1208,8 +1208,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1245,7 +1245,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1273,8 +1273,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1303,7 +1303,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1333,8 +1333,8 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1364,7 +1364,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1394,13 +1394,10 @@ "
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "01-responsive-web-design/css-flexbox.json", - "superBlock": "responsive-web-design", - "superOrder": 1 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/01-responsive-web-design/css-grid.json b/packages/learn/seed/challenges/01-responsive-web-design/css-grid.json index 0d53869960..a0950af3df 100644 --- a/packages/learn/seed/challenges/01-responsive-web-design/css-grid.json +++ b/packages/learn/seed/challenges/01-responsive-web-design/css-grid.json @@ -26,7 +26,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -57,8 +57,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -86,7 +86,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -118,8 +118,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -144,7 +144,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -177,8 +177,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -209,7 +209,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -243,8 +243,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -271,7 +271,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -306,8 +306,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -332,7 +332,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -367,8 +367,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -393,7 +393,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -427,8 +427,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -438,6 +438,8 @@ "description": [ "Up to this point, all the properties that have been discussed are for grid containers. The grid-column property is the first one for use on the grid items themselves.", "The hypothetical horizontal and vertical lines that create the grid are referred to as lines. These lines are numbered starting with 1 at the top left corner of the grid and move right for columns and down for rows, counting upward.", + "This is what the lines look like for a 3x3 grid:", + "

column lines

1

2

3

4

row lines

1

2

3

4

", "To control the amount of columns an item will consume, you can use the grid-column property in conjunction with the line numbers you want the item to start and stop at.", "Here's an example:", "
grid-column: 1 / 3;
", @@ -458,7 +460,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -497,8 +499,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -523,7 +525,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -563,8 +565,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -572,7 +574,7 @@ "id": "5a90374338fddaf9a66b5d3a", "title": "Align an Item Horizontally using justify-self", "description": [ - "In CSS Grid, the content of each item is located in a box which is referred to as a cell. You can align the content's position within its cell horizontally using the justify-self property on a grid item. By default, this property has a value of stetch, which will make the content fill the whole width of the cell. This CSS Grid property accepts other values as well:", + "In CSS Grid, the content of each item is located in a box which is referred to as a cell. You can align the content's position within its cell horizontally using the justify-self property on a grid item. By default, this property has a value of stretch, which will make the content fill the whole width of the cell. This CSS Grid property accepts other values as well:", "start: aligns the content at the left of the cell,", "center: aligns the content in the center of the cell,", "end: aligns the content at the right of the cell.", @@ -592,7 +594,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -632,8 +634,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -658,7 +660,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -698,8 +700,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -724,7 +726,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -760,8 +762,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -786,7 +788,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -822,8 +824,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -852,7 +854,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -891,8 +893,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -919,7 +921,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -962,8 +964,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -992,7 +994,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1031,8 +1033,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1065,7 +1067,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1101,8 +1103,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1112,7 +1114,7 @@ "description": [ "There's another built-in function to use with grid-template-columns and grid-template-rows called minmax. It's used to limit the size of items when the grid container changes size. To do this you need to specify the acceptable size range for your item. Here is an example:", "
grid-template-columns: 100px minmax(50px, 200px);
", - "In the code above, grid-template-columns is set to create three columns; the first is 100px wide, and the second has the minimum width of 50px and the maximum width of 200px.", + "In the code above, grid-template-columns is set to create two columns; the first is 100px wide, and the second has the minimum width of 50px and the maximum width of 200px.", "
", "Using the minmax function, replace the 1fr in the repeat function with a column size that has the minimum width of 90px and the maximum width of 1fr, and resize the preview panel to see the effect." ], @@ -1129,7 +1131,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1165,8 +1167,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1195,7 +1197,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1248,8 +1250,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1275,7 +1277,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1329,8 +1331,8 @@ "
5
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1356,7 +1358,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1430,8 +1432,8 @@ "
footer
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1461,7 +1463,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1525,13 +1527,10 @@ "
footer
", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "01-responsive-web-design/css-grid.json", - "superBlock": "responsive-web-design", - "superOrder": 1 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/01-responsive-web-design/responsive-web-design-projects.json b/packages/learn/seed/challenges/01-responsive-web-design/responsive-web-design-projects.json index 72c433a435..a5075a3cd0 100644 --- a/packages/learn/seed/challenges/01-responsive-web-design/responsive-web-design-projects.json +++ b/packages/learn/seed/challenges/01-responsive-web-design/responsive-web-design-projects.json @@ -1,5 +1,5 @@ { - "name": "Applied Responsive Web Design Projects", + "name": "Responsive Web Design Projects", "order": 7, "time": "150 hours", "helpRoom": "Help", @@ -8,8 +8,17 @@ "id": "bd7158d8c442eddfaeb5bd18", "title": "Build a Tribute Page", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/zNqgVx.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use HTML, JavaScript, and CSS to complete this project. Plain CSS is recommended because that is what the lessons have covered so far and you should get some practice with plain CSS. You can use Bootstrap or SASS if you choose. Additional technologies (just for example jQuery, React, Angular, or Vue) are not recommended for this project, and using them is at your own risk. Other projects will give you a chance to work with different technology stacks like React. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: My tribute page should have an element with a corresponding id=\"main\", which contains all other elements.", + "User Story #2: I should see an element with a corresponding id=\"title\", which contains a string (i.e. text) that describes the subject of the tribute page (e.g. \"Dr. Norman Borlaug\").", + "User Story #3: I should see a div element with a corresponding id=\"img-div\".", + "User Story #4: Within the img-div element, I should see an img element with a corresponding id=\"image\".", + "User Story #5: Within the img-div element, I should see an element with a corresponding id=\"img-caption\" that contains textual content describing the image shown in img-div.", + "User Story #6: I should see an element with a corresponding id=\"tribute-info\", which contains textual content describing the subject of the tribute page.", + "User Story #7: I should see an a element with a corresponding id=\"tribute-link\", which links to an outside site that contains additional information about the subject of the tribute page. HINT: You must give your element an attribute of target and set it to _blank in order for your link to open in a new tab (i.e. target=\"_blank\").", + "User Story #8: The img element should responsively resize, relative to the width of its parent element, without exceeding its original size.", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js.", "Once you're done, submit the URL to your working project with all its tests passing.", "Remember to use the Read-Search-Ask method if you get stuck." @@ -36,8 +45,25 @@ "id": "587d78af367417b2b2512b03", "title": "Build a Survey Form", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/VPaoNP.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use HTML, JavaScript, and CSS to complete this project. Plain CSS is recommended because that is what the lessons have covered so far and you should get some practice with plain CSS. You can use Bootstrap or SASS if you choose. Additional technologies (just for example jQuery, React, Angular, or Vue) are not recommended for this project, and using them is at your own risk. Other projects will give you a chance to work with different technology stacks like React. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: I can see a title with id=\"title\" in H1 sized text.", + "User Story #2: I can see a short explanation with id=\"description\" in P sized text.", + "User Story #3: I can see a form with id=\"survey-form\".", + "User Story #4: Inside the form element, I am required to enter my name in a field with id=\"name\".", + "User Story #5: Inside the form element, I am required to enter an email in a field with id=\"email\".", + "User Story #6: If I enter an email that is not formatted correctly, I will see an HTML5 validation error.", + "User Story #7: Inside the form, I can enter a number in a field with id=\"number\".", + "User Story #8: If I enter non-numbers in the number input, I will see an HTML5 validation error.", + "User Story #9: If I enter numbers outside the range of the number input, I will see an HTML5 validation error.", + "User Story #10: For the name, email, and number input fields inside the form I can see corresponding labels that describe the purpose of each field with the following ids: id=\"name-label\", id=\"email-label\", and id=\"number-label\".", + "User Story #11: For the name, email, and number input fields, I can see placeholder text that gives me a description or instructions for each field.", + "User Story #12: Inside the form element, I can select an option from a dropdown that has a corresponding id=\"dropdown\".", + "User Story #13: Inside the form element, I can select a field from one or more groups of radio buttons. Each group should be grouped using the name attribute.", + "User Story #14: Inside the form element, I can select several fields from a series of checkboxes, each of which must have a value attribute.", + "User Story #15: Inside the form element, I am presented with a textarea at the end for additional comments.", + "User Story #16: Inside the form element, I am presented with a button with id=\"submit\" to submit all my inputs.", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js", "Once you're done, submit the URL to your working project with all its tests passing.", "Remember to use the Read-Search-Ask method if you get stuck." @@ -54,8 +80,24 @@ "id": "587d78af367417b2b2512b04", "title": "Build a Product Landing Page", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/RKRbwL.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use HTML, JavaScript, and CSS to complete this project. Plain CSS is recommended because that is what the lessons have covered so far and you should get some practice with plain CSS. You can use Bootstrap or SASS if you choose. Additional technologies (just for example jQuery, React, Angular, or Vue) are not recommended for this project, and using them is at your own risk. Other projects will give you a chance to work with different technology stacks like React. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: My product landing page should have a header element with a corresponding id=\"header\".", + "User Story #2: I can see an image within the header element with a corresponding id=\"header-img\". A company logo would make a good image here.", + "User Story #3: Within the #header element I can see a nav element with a corresponding id=\"nav-bar\".", + "User Story #4: I can see at least three clickable elements inside the nav element, each with the class nav-link.", + "User Story #5: When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.", + "User Story #6: I can watch an embedded product video with id=\"video\".", + "User Story #7: My landing page has a form element with a corresponding id=\"form\".", + "User Story #8: Within the form, there is an input field with id=\"email\" where I can enter an email address.", + "User Story #9: The #email input field should have placeholder text to let the user know what the field is for.", + "User Story #10: The #email input field uses HTML5 validation to confirm that the entered text is an email address.", + "User Story #11: Within the form, there is a submit input with a corresponding id=\"submit\".", + "User Story #12: When I click the #submit element, the email is submitted to a static page (use this mock URL: https://www.freecodecamp.com/email-submit) that confirms the email address was entered and that it posted successfully.", + "User Story #13: The navbar should always be at the top of the viewport.", + "User Story #14: My product landing page should have at least one media query.", + "User Story #15: My product landing page should utilize CSS flexbox at least once.", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js", "Once you're done, submit the URL to your working project with all its tests passing.", "Remember to use the Read-Search-Ask method if you get stuck." @@ -72,8 +114,24 @@ "id": "587d78b0367417b2b2512b05", "title": "Build a Technical Documentation Page", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/NdrKKL.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use HTML, JavaScript, and CSS to complete this project. Plain CSS is recommended because that is what the lessons have covered so far and you should get some practice with plain CSS. You can use Bootstrap or SASS if you choose. Additional technologies (just for example jQuery, React, Angular, or Vue) are not recommended for this project, and using them is at your own risk. Other projects will give you a chance to work with different technology stacks like React. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: I can see a main element with a corresponding id=\"main-doc\", which contains the page's main content (technical documentation).", + "User Story #2: Within the #main-doc element, I can see several section elements, each with a class of main-section. There should be a minimum of 5.", + "User Story #3: The first element within each .main-section should be a header element which contains text that describes the topic of that section.", + "User Story #4: Each section element with the class of main-section should also have an id that corresponds with the text of each header contained within it. Any spaces should be replaced with underscores (e.g. The section that contains the header \"Javascript and Java\" should have a corresponding id=\"Javascript_and_Java\").", + "User Story #5: The .main-section elements should contain at least 10 p elements total (not each).", + "User Story #6: The .main-section elements should contain at least 5 code elements total (not each).", + "User Story #7: The .main-section elements should contain at least 5 li items total (not each).", + "User Story #8: I can see a nav element with a corresponding id=\"navbar\".", + "User Story #9: The navbar element should contain one header element which contains text that describes the topic of the technical documentation.", + "User Story #10: Additionally, the navbar should contain link (a) elements with the class of nav-link. There should be one for every element with the class main-section.", + "User Story #11: The header element in the navbar must come before any link (a) elements in the navbar.", + "User Story #12: Each element with the class of nav-link should contain text that corresponds to the header text within each section (e.g. if you have a \"Hello world\" section/header, your navbar should have an element which contains the text \"Hello world\").", + "User Story #13: When I click on a navbar element, the page should navigate to the corresponding section of the main-doc element (e.g. If I click on a nav-link element that contains the text \"Hello world\", the page navigates to a section element that has that id and contains the corresponding header.", + "User Story #14: On regular sized devices (laptops, desktops), the element with id=\"navbar\" should be shown on the left side of the screen and should always be visible to the user.", + "User Story #15: My Technical Documentation page should use at least one media query.", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js", "Once you're done, submit the URL to your working project with all its tests passing.", "Remember to use the Read-Search-Ask method if you get stuck." @@ -90,8 +148,20 @@ "id": "bd7158d8c242eddfaeb5bd13", "title": "Build a Personal Portfolio Webpage", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/zNBOYG.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use HTML, JavaScript, and CSS to complete this project. Plain CSS is recommended because that is what the lessons have covered so far and you should get some practice with plain CSS. You can use Bootstrap or SASS if you choose. Additional technologies (just for example jQuery, React, Angular, or Vue) are not recommended for this project, and using them is at your own risk. Other projects will give you a chance to work with different technology stacks like React. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: My portfolio should have a welcome section with an id of welcome-section.", + "User Story #2: The welcome section should have an h1 element that contains text.", + "User Story #3: My portfolio should have a projects section with an id of projects.", + "User Story #4: The projects section should contain at least one element with a class of project-tile to hold a project.", + "User Story #5: The projects section should contain at least one link to a project.", + "User Story #6: My portfolio should have a navbar with an id of navbar.", + "User Story #7: The navbar should contain at least one link that I can click on to navigate to different sections of the page.", + "User Story #8: My portfolio should have a link with an id of profile-link, which opens my GitHub or FCC profile in a new tab.", + "User Story #9: My portfolio should have at least one media query.", + "User Story #10: The height of the welcome section should be equal to the height of the viewport.", + "User Story #11: The navbar should always be at the top of the viewport.", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js", "Once you're done, submit the URL to your working project with all its tests passing.", "Remember to use the Read-Search-Ask method if you get stuck." @@ -113,8 +183,5 @@ } } } - ], - "fileName": "01-responsive-web-design/responsive-web-design-projects.json", - "superBlock": "responsive-web-design", - "superOrder": 1 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/01-responsive-web-design/responsive-web-design.json b/packages/learn/seed/challenges/01-responsive-web-design/responsive-web-design.json index 32492b0898..886ca4b0a5 100644 --- a/packages/learn/seed/challenges/01-responsive-web-design/responsive-web-design.json +++ b/packages/learn/seed/challenges/01-responsive-web-design/responsive-web-design.json @@ -48,7 +48,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -64,8 +64,8 @@ " ", "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis tempus massa. Aenean erat nisl, gravida vel vestibulum cursus, interdum sit amet lectus. Sed sit amet quam nibh. Suspendisse quis tincidunt nulla. In hac habitasse platea dictumst. Ut sit amet pretium nisl. Vivamus vel mi sem. Aenean sit amet consectetur sem. Suspendisse pretium, purus et gravida consequat, nunc ligula ultricies diam, at aliquet velit libero a dui.

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -115,7 +115,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -126,8 +126,8 @@ "", "\"freeCodeCamp" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -169,7 +169,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -180,8 +180,8 @@ "", "\"freeCodeCamp" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -223,7 +223,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -235,13 +235,10 @@ "

Importantus Ipsum

", "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis tempus massa. Aenean erat nisl, gravida vel vestibulum cursus, interdum sit amet lectus. Sed sit amet quam nibh. Suspendisse quis tincidunt nulla. In hac habitasse platea dictumst. Ut sit amet pretium nisl. Vivamus vel mi sem. Aenean sit amet consectetur sem. Suspendisse pretium, purus et gravida consequat, nunc ligula ultricies diam, at aliquet velit libero a dui.

" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "01-responsive-web-design/responsive-web-design.json", - "superBlock": "responsive-web-design", - "superOrder": 1 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json index 3e598e9119..72178acd28 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json @@ -75,8 +75,8 @@ "", "convertToF(30);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -151,8 +151,8 @@ "", "reverseString(\"hello\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -232,8 +232,8 @@ "", "factorialize(5);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -311,8 +311,8 @@ "", "findLongestWordLength(\"The quick brown fox jumped over the lazy dog\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -383,8 +383,8 @@ "", "largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -483,8 +483,8 @@ "", "confirmEnding(\"Bastian\", \"n\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -563,8 +563,8 @@ "", "repeatStringNumTimes(\"abc\", 3);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -639,8 +639,8 @@ "", "truncateString(\"A-tisket a-tasket A green and yellow basket\", 8);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -706,8 +706,8 @@ "", "findElement([1, 2, 3, 4], num => num % 2 === 0);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -809,8 +809,8 @@ "", "booWho(null);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -879,8 +879,8 @@ "", "titleCase(\"I'm a little tea pot\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -955,8 +955,11 @@ "", "frankenSplice([1, 2, 3], [4, 5, 6], 1);" ], - "head": "", - "tail": "let testArr1 = [1, 2];\nlet testArr2 = [\"a\", \"b\"];" + "head": [], + "tail": [ + "let testArr1 = [1, 2];", + "let testArr2 = [\"a\", \"b\"];" + ] } } }, @@ -1029,8 +1032,8 @@ "", "bouncer([7, \"ate\", \"\", false, 9]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1151,8 +1154,8 @@ "", "getIndexToIns([40, 60], 50);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1247,8 +1250,8 @@ "", "mutation([\"hello\", \"hey\"]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1328,13 +1331,10 @@ "", "chunkArrayInGroups([\"a\", \"b\", \"c\", \"d\"], 2);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-data-structures.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-data-structures.json index c8daecb53b..0981b15c1b 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-data-structures.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-data-structures.json @@ -51,8 +51,8 @@ "contents": [ "let yourArray; // change this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -107,8 +107,8 @@ "//change code above this line", "console.log(myArray);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -158,8 +158,8 @@ "// do not change code below this line", "console.log(mixedNumbers(['IV', 5, 'six']));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -209,8 +209,8 @@ "// do not change code below this line", "console.log(popShift(['challenge', 'is', 'not', 'complete']));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -257,8 +257,8 @@ "// do not change code below this line", "console.log(sumOfTen([2, 5, 1, 5, 2, 1]));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -311,8 +311,8 @@ "// do not change code below this line", "console.log(htmlColorNames(['DarkGoldenRod', 'WhiteSmoke', 'LavenderBlush', 'PaleTurqoise', 'FireBrick']));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -356,8 +356,8 @@ "// do not change code below this line", "console.log(forecast(['cold', 'rainy', 'warm', 'sunny', 'cool', 'thunderstorms']));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -418,8 +418,8 @@ "// change code here to test different cases:", "console.log(copyMachine([true, false, true], 2));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -463,8 +463,8 @@ "// do not change code below this line", "console.log(spreadOut());" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -520,8 +520,8 @@ "// change code here to test different cases:", "console.log(quickCheck(['squash', 'onions', 'shallots'], 'mushrooms'));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -580,8 +580,8 @@ "// change code here to test different cases:", "console.log(filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -643,8 +643,8 @@ " // change code above this line", "];" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -707,8 +707,8 @@ "", "console.log(foods);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -766,8 +766,8 @@ "", "console.log(userActivity);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -832,8 +832,8 @@ "// change code below this line to test different cases:", "console.log(checkInventory(\"apples\"));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -884,8 +884,8 @@ "", "console.log(foods);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -950,8 +950,8 @@ "", "console.log(isEveryoneHere(users));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1014,8 +1014,8 @@ "", "console.log(countOnline(users));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1075,8 +1075,8 @@ "", "console.log(getArrayOfUsers(users));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1141,13 +1141,10 @@ "", "console.log(addFriend(user, 'Pete'));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/basic-data-structures.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json index e0059436ce..23a82d7540 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json @@ -67,11 +67,9 @@ "key": "indexjs", "ext": "js", "name": "index", - "contents": [ - "" - ], - "head": "", - "tail": "" + "contents": [], + "head": [], + "tail": [] } } }, @@ -142,8 +140,10 @@ "// Declare myName below this line", "" ], - "head": "", - "tail": "if(typeof myName !== \"undefined\"){(function(v){return v;})(myName);}" + "head": [], + "tail": [ + "if(typeof myName !== \"undefined\"){(function(v){return v;})(myName);}" + ] } } }, @@ -214,8 +214,17 @@ "// Only change code below this line", "" ], - "head": "if (typeof a != 'undefined') {\n a = undefined;\n}\nif (typeof b != 'undefined') {\n b = undefined;\n}", - "tail": "(function(a,b){return \"a = \" + a + \", b = \" + b;})(a,b);" + "head": [ + "if (typeof a != 'undefined') {", + " a = undefined;", + "}", + "if (typeof b != 'undefined') {", + " b = undefined;", + "}" + ], + "tail": [ + "(function(a,b){return \"a = \" + a + \", b = \" + b;})(a,b);" + ] } } }, @@ -265,8 +274,10 @@ "// Only change code below this line", "" ], - "head": "", - "tail": "if(typeof a !== 'undefined') {(function(a){return \"a = \" + a;})(a);} else { (function() {return 'a is undefined';})(); }" + "head": [], + "tail": [ + "if(typeof a !== 'undefined') {(function(a){return \"a = \" + a;})(a);} else { (function() {return 'a is undefined';})(); }" + ] } } }, @@ -330,8 +341,10 @@ "c = c + \" String!\";", "" ], - "head": "", - "tail": "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = '\" + c + \"'\"; })(a,b,c);" + "head": [], + "tail": [ + "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = '\" + c + \"'\"; })(a,b,c);" + ] } } }, @@ -411,8 +424,8 @@ "PRoperCAmelCAse = \"A String\";", "tITLEcASEoVER = 9000;" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -462,8 +475,10 @@ "var sum = 10 + 0;", "" ], - "head": "", - "tail": "(function(z){return 'sum = '+z;})(sum);" + "head": [], + "tail": [ + "(function(z){return 'sum = '+z;})(sum);" + ] } } }, @@ -515,8 +530,10 @@ "", "" ], - "head": "", - "tail": "(function(z){return 'difference = '+z;})(difference);" + "head": [], + "tail": [ + "(function(z){return 'difference = '+z;})(difference);" + ] } } }, @@ -568,8 +585,10 @@ "", "" ], - "head": "", - "tail": "(function(z){return 'product = '+z;})(product);" + "head": [], + "tail": [ + "(function(z){return 'product = '+z;})(product);" + ] } } }, @@ -621,8 +640,10 @@ "", "" ], - "head": "", - "tail": "(function(z){return 'quotient = '+z;})(quotient);" + "head": [], + "tail": [ + "(function(z){return 'quotient = '+z;})(quotient);" + ] } } }, @@ -689,8 +710,10 @@ "myVar = myVar + 1;", "" ], - "head": "", - "tail": "(function(z){return 'myVar = ' + z;})(myVar);" + "head": [], + "tail": [ + "(function(z){return 'myVar = ' + z;})(myVar);" + ] } } }, @@ -756,8 +779,10 @@ "myVar = myVar - 1;", "" ], - "head": "", - "tail": "(function(z){return 'myVar = ' + z;})(myVar);" + "head": [], + "tail": [ + "(function(z){return 'myVar = ' + z;})(myVar);" + ] } } }, @@ -808,8 +833,10 @@ "", "" ], - "head": "", - "tail": "(function(){if(typeof myDecimal !== \"undefined\"){return myDecimal;}})();" + "head": [], + "tail": [ + "(function(){if(typeof myDecimal !== \"undefined\"){return myDecimal;}})();" + ] } } }, @@ -858,8 +885,10 @@ "", "" ], - "head": "", - "tail": "(function(y){return 'product = '+y;})(product);" + "head": [], + "tail": [ + "(function(y){return 'product = '+y;})(product);" + ] } } }, @@ -908,8 +937,10 @@ "", "" ], - "head": "", - "tail": "(function(y){return 'quotient = '+y;})(quotient);" + "head": [], + "tail": [ + "(function(y){return 'quotient = '+y;})(quotient);" + ] } } }, @@ -972,8 +1003,10 @@ "var remainder;", "" ], - "head": "", - "tail": "(function(y){return 'remainder = '+y;})(remainder);" + "head": [], + "tail": [ + "(function(y){return 'remainder = '+y;})(remainder);" + ] } } }, @@ -1048,8 +1081,10 @@ "c = c + 7;", "" ], - "head": "", - "tail": "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);" + "head": [], + "tail": [ + "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);" + ] } } }, @@ -1123,8 +1158,10 @@ "", "" ], - "head": "", - "tail": "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);" + "head": [], + "tail": [ + "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);" + ] } } }, @@ -1198,8 +1235,10 @@ "", "" ], - "head": "", - "tail": "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);" + "head": [], + "tail": [ + "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);" + ] } } }, @@ -1272,8 +1311,10 @@ "c = c / 11;", "" ], - "head": "", - "tail": "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);" + "head": [], + "tail": [ + "(function(a,b,c){ return \"a = \" + a + \", b = \" + b + \", c = \" + c; })(a,b,c);" + ] } } }, @@ -1325,8 +1366,10 @@ "", "" ], - "head": "", - "tail": "if(typeof myFirstName !== \"undefined\" && typeof myLastName !== \"undefined\"){(function(){return myFirstName + ', ' + myLastName;})();}" + "head": [], + "tail": [ + "if(typeof myFirstName !== \"undefined\" && typeof myLastName !== \"undefined\"){(function(){return myFirstName + ', ' + myLastName;})();}" + ] } } }, @@ -1384,8 +1427,16 @@ "", "" ], - "head": "", - "tail": "(function(){\n if(typeof myStr === 'string') {\n console.log(\"myStr = \\\"\" + myStr + \"\\\"\");\n } else {\n console.log(\"myStr is undefined\");\n }\n})();" + "head": [], + "tail": [ + "(function(){", + " if(typeof myStr === 'string') {", + " console.log(\"myStr = \\\"\" + myStr + \"\\\"\");", + " } else {", + " console.log(\"myStr is undefined\");", + " }", + "})();" + ] } } }, @@ -1444,8 +1495,10 @@ "", "" ], - "head": "", - "tail": "(function() { return \"myStr = \" + myStr; })();" + "head": [], + "tail": [ + "(function() { return \"myStr = \" + myStr; })();" + ] } } }, @@ -1517,8 +1570,12 @@ "", "" ], - "head": "", - "tail": "(function(){\nif (myStr !== undefined){\nconsole.log('myStr:\\n' + myStr);}})();" + "head": [], + "tail": [ + "(function(){", + "if (myStr !== undefined){", + "console.log('myStr:\\n' + myStr);}})();" + ] } } }, @@ -1585,8 +1642,16 @@ "", "" ], - "head": "", - "tail": "(function(){\n if(typeof myStr === 'string') {\n return 'myStr = \"' + myStr + '\"';\n } else {\n return 'myStr is not a string';\n }\n})();" + "head": [], + "tail": [ + "(function(){", + " if(typeof myStr === 'string') {", + " return 'myStr = \"' + myStr + '\"';", + " } else {", + " return 'myStr is not a string';", + " }", + "})();" + ] } } }, @@ -1642,8 +1707,16 @@ "", "" ], - "head": "", - "tail": "(function(){\n if(typeof myStr === 'string') {\n return 'myStr = \"' + myStr + '\"';\n } else {\n return 'myStr is not a string';\n }\n})();" + "head": [], + "tail": [ + "(function(){", + " if(typeof myStr === 'string') {", + " return 'myStr = \"' + myStr + '\"';", + " } else {", + " return 'myStr is not a string';", + " }", + "})();" + ] } } }, @@ -1697,8 +1770,23 @@ "", "" ], - "head": "", - "tail": "(function(){\n var output = [];\n if(typeof myName === 'string') {\n output.push('myName = \"' + myName + '\"');\n } else {\n output.push('myName is not a string');\n }\n if(typeof myStr === 'string') {\n output.push('myStr = \"' + myStr + '\"');\n } else {\n output.push('myStr is not a string');\n }\n return output.join('\\n');\n})();" + "head": [], + "tail": [ + "(function(){", + " var output = [];", + " if(typeof myName === 'string') {", + " output.push('myName = \"' + myName + '\"');", + " } else {", + " output.push('myName is not a string');", + " }", + " if(typeof myStr === 'string') {", + " output.push('myStr = \"' + myStr + '\"');", + " } else {", + " output.push('myStr is not a string');", + " }", + " return output.join('\\n');", + "})();" + ] } } }, @@ -1754,8 +1842,23 @@ "var myStr = \"Learning to code is \";", "" ], - "head": "", - "tail": "(function(){\n var output = [];\n if(typeof someAdjective === 'string') {\n output.push('someAdjective = \"' + someAdjective + '\"');\n } else {\n output.push('someAdjective is not a string');\n }\n if(typeof myStr === 'string') {\n output.push('myStr = \"' + myStr + '\"');\n } else {\n output.push('myStr is not a string');\n }\n return output.join('\\n');\n})();" + "head": [], + "tail": [ + "(function(){", + " var output = [];", + " if(typeof someAdjective === 'string') {", + " output.push('someAdjective = \"' + someAdjective + '\"');", + " } else {", + " output.push('someAdjective is not a string');", + " }", + " if(typeof myStr === 'string') {", + " output.push('myStr = \"' + myStr + '\"');", + " } else {", + " output.push('myStr is not a string');", + " }", + " return output.join('\\n');", + "})();" + ] } } }, @@ -1816,8 +1919,10 @@ "", "" ], - "head": "", - "tail": "if(typeof lastNameLength !== \"undefined\"){(function(){return lastNameLength;})();}" + "head": [], + "tail": [ + "if(typeof lastNameLength !== \"undefined\"){(function(){return lastNameLength;})();}" + ] } } }, @@ -1880,8 +1985,10 @@ "", "" ], - "head": "", - "tail": "(function(v){return v;})(firstLetterOfLastName);" + "head": [], + "tail": [ + "(function(v){return v;})(firstLetterOfLastName);" + ] } } }, @@ -1942,8 +2049,10 @@ "", "" ], - "head": "", - "tail": "(function(v){return \"myStr = \" + v;})(myStr);" + "head": [], + "tail": [ + "(function(v){return \"myStr = \" + v;})(myStr);" + ] } } }, @@ -2002,8 +2111,10 @@ "", "" ], - "head": "", - "tail": "(function(v){return v;})(thirdLetterOfLastName);" + "head": [], + "tail": [ + "(function(v){return v;})(thirdLetterOfLastName);" + ] } } }, @@ -2062,8 +2173,10 @@ "", "" ], - "head": "", - "tail": "(function(v){return v;})(lastLetterOfLastName);" + "head": [], + "tail": [ + "(function(v){return v;})(lastLetterOfLastName);" + ] } } }, @@ -2122,8 +2235,10 @@ "", "" ], - "head": "", - "tail": "(function(v){return v;})(secondToLastLetterOfLastName);" + "head": [], + "tail": [ + "(function(v){return v;})(secondToLastLetterOfLastName);" + ] } } }, @@ -2188,8 +2303,11 @@ "// Change the words here to test your function", "wordBlanks(\"dog\", \"big\", \"ran\", \"quickly\");" ], - "head": "", - "tail": "var test1 = wordBlanks(\"dog\", \"big\", \"ran\", \"quickly\");\nvar test2 = wordBlanks(\"cat\", \"little\", \"hit\", \"slowly\");" + "head": [], + "tail": [ + "var test1 = wordBlanks(\"dog\", \"big\", \"ran\", \"quickly\");", + "var test2 = wordBlanks(\"cat\", \"little\", \"hit\", \"slowly\");" + ] } } }, @@ -2248,8 +2366,10 @@ "var myArray = [];", "" ], - "head": "", - "tail": "(function(z){return z;})(myArray);" + "head": [], + "tail": [ + "(function(z){return z;})(myArray);" + ] } } }, @@ -2295,8 +2415,10 @@ "var myArray = [];", "" ], - "head": "", - "tail": "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + "head": [], + "tail": [ + "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + ] } } }, @@ -2359,8 +2481,10 @@ "// Only change code below this line.", "" ], - "head": "", - "tail": "if(typeof myArray !== \"undefined\" && typeof myData !== \"undefined\"){(function(y,z){return 'myArray = ' + JSON.stringify(y) + ', myData = ' + JSON.stringify(z);})(myArray, myData);}" + "head": [], + "tail": [ + "if(typeof myArray !== \"undefined\" && typeof myData !== \"undefined\"){(function(y,z){return 'myArray = ' + JSON.stringify(y) + ', myData = ' + JSON.stringify(z);})(myArray, myData);}" + ] } } }, @@ -2420,8 +2544,10 @@ "", "" ], - "head": "", - "tail": "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + "head": [], + "tail": [ + "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + ] } } }, @@ -2478,8 +2604,10 @@ "var myData = myArray[0][0];", "" ], - "head": "", - "tail": "if(typeof myArray !== \"undefined\"){(function(){return \"myData: \" + myData + \" myArray: \" + JSON.stringify(myArray);})();}" + "head": [], + "tail": [ + "if(typeof myArray !== \"undefined\"){(function(){return \"myData: \" + myData + \" myArray: \" + JSON.stringify(myArray);})();}" + ] } } }, @@ -2532,8 +2660,10 @@ "", "" ], - "head": "", - "tail": "(function(z){return 'myArray = ' + JSON.stringify(z);})(myArray);" + "head": [], + "tail": [ + "(function(z){return 'myArray = ' + JSON.stringify(z);})(myArray);" + ] } } }, @@ -2598,8 +2728,10 @@ "", "" ], - "head": "", - "tail": "(function(y, z){return 'myArray = ' + JSON.stringify(y) + ' & removedFromMyArray = ' + JSON.stringify(z);})(myArray, removedFromMyArray);" + "head": [], + "tail": [ + "(function(y, z){return 'myArray = ' + JSON.stringify(y) + ' & removedFromMyArray = ' + JSON.stringify(z);})(myArray, removedFromMyArray);" + ] } } }, @@ -2657,8 +2789,10 @@ "", "" ], - "head": "", - "tail": "(function(y, z){return 'myArray = ' + JSON.stringify(y) + ' & removedFromMyArray = ' + JSON.stringify(z);})(myArray, removedFromMyArray);" + "head": [], + "tail": [ + "(function(y, z){return 'myArray = ' + JSON.stringify(y) + ' & removedFromMyArray = ' + JSON.stringify(z);})(myArray, removedFromMyArray);" + ] } } }, @@ -2713,8 +2847,10 @@ "", "" ], - "head": "", - "tail": "(function(y, z){return 'myArray = ' + JSON.stringify(y);})(myArray);" + "head": [], + "tail": [ + "(function(y, z){return 'myArray = ' + JSON.stringify(y);})(myArray);" + ] } } }, @@ -2772,8 +2908,35 @@ "", "" ], - "head": "", - "tail": "var count = 0;\nvar isArray = false;\nvar hasString = false;\nvar hasNumber = false;\n(function(list){\n if(Array.isArray(myList)) {\n isArray = true;\n if(myList.length > 0) {\n hasString = true;\n hasNumber = true;\n myList.forEach(function(elem) {\n if(typeof elem[0] !== 'string') {\n hasString = false;\n }\n if(typeof elem[1] !== 'number') {\n hasNumber = false;\n }\n });\n }\n count = myList.length;\n return JSON.stringify(myList);\n } else {\n return \"myList is not an array\";\n }\n\n})(myList);" + "head": [], + "tail": [ + "var count = 0;", + "var isArray = false;", + "var hasString = false;", + "var hasNumber = false;", + "(function(list){", + " if(Array.isArray(myList)) {", + " isArray = true;", + " if(myList.length > 0) {", + " hasString = true;", + " hasNumber = true;", + " myList.forEach(function(elem) {", + " if(typeof elem[0] !== 'string') {", + " hasString = false;", + " }", + " if(typeof elem[1] !== 'number') {", + " hasNumber = false;", + " }", + " });", + " }", + " count = myList.length;", + " return JSON.stringify(myList);", + " } else {", + " return \"myList is not an array\";", + " }", + "", + "})(myList);" + ] } } }, @@ -2841,8 +3004,37 @@ "// Only change code below this line", "" ], - "head": "var logOutput = \"\";\nvar originalConsole = console\nfunction capture() {\n var nativeLog = console.log;\n console.log = function (message) {\n if(message && message.trim) logOutput = message.trim();\n if(nativeLog.apply) {\n nativeLog.apply(originalConsole, arguments);\n } else {\n var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');\n nativeLog(nativeMsg);\n }\n };\n}\n\nfunction uncapture() {\n console.log = originalConsole.log;\n}\n\ncapture();", - "tail": "uncapture();\n\nif (typeof reusableFunction !== \"function\") { \n (function() { return \"reusableFunction is not defined\"; })();\n} else {\n (function() { return logOutput || \"console.log never called\"; })();\n}" + "head": [ + "var logOutput = \"\";", + "var originalConsole = console", + "function capture() {", + " var nativeLog = console.log;", + " console.log = function (message) {", + " if(message && message.trim) logOutput = message.trim();", + " if(nativeLog.apply) {", + " nativeLog.apply(originalConsole, arguments);", + " } else {", + " var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');", + " nativeLog(nativeMsg);", + " }", + " };", + "}", + "", + "function uncapture() {", + " console.log = originalConsole.log;", + "}", + "", + "capture();" + ], + "tail": [ + "uncapture();", + "", + "if (typeof reusableFunction !== \"function\") { ", + " (function() { return \"reusableFunction is not defined\"; })();", + "} else {", + " (function() { return logOutput || \"console.log never called\"; })();", + "}" + ] } } }, @@ -2914,8 +3106,37 @@ "", "" ], - "head": "var logOutput = \"\";\nvar originalConsole = console\nfunction capture() {\n var nativeLog = console.log;\n console.log = function (message) {\n if(message) logOutput = JSON.stringify(message).trim();\n if(nativeLog.apply) {\n nativeLog.apply(originalConsole, arguments);\n } else {\n var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');\n nativeLog(nativeMsg);\n }\n };\n}\n\nfunction uncapture() {\n console.log = originalConsole.log;\n}\n\ncapture();", - "tail": "uncapture();\n\nif (typeof functionWithArgs !== \"function\") { \n (function() { return \"functionWithArgs is not defined\"; })();\n} else {\n (function() { return logOutput || \"console.log never called\"; })();\n}" + "head": [ + "var logOutput = \"\";", + "var originalConsole = console", + "function capture() {", + " var nativeLog = console.log;", + " console.log = function (message) {", + " if(message) logOutput = JSON.stringify(message).trim();", + " if(nativeLog.apply) {", + " nativeLog.apply(originalConsole, arguments);", + " } else {", + " var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');", + " nativeLog(nativeMsg);", + " }", + " };", + "}", + "", + "function uncapture() {", + " console.log = originalConsole.log;", + "}", + "", + "capture();" + ], + "tail": [ + "uncapture();", + "", + "if (typeof functionWithArgs !== \"function\") { ", + " (function() { return \"functionWithArgs is not defined\"; })();", + "} else {", + " (function() { return logOutput || \"console.log never called\"; })();", + "}" + ] } } }, @@ -2991,8 +3212,34 @@ " console.log(output);", "}" ], - "head": "var logOutput = \"\";\nvar originalConsole = console\nfunction capture() {\n var nativeLog = console.log;\n console.log = function (message) {\n logOutput = message;\n if(nativeLog.apply) {\n nativeLog.apply(originalConsole, arguments);\n } else {\n var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');\n nativeLog(nativeMsg);\n }\n };\n}\n\nfunction uncapture() {\n console.log = originalConsole.log;\n}\nvar oopsGlobal;\ncapture();", - "tail": "fun1();\nfun2();\nuncapture();\n(function() { return logOutput || \"console.log never called\"; })();" + "head": [ + "var logOutput = \"\";", + "var originalConsole = console", + "function capture() {", + " var nativeLog = console.log;", + " console.log = function (message) {", + " logOutput = message;", + " if(nativeLog.apply) {", + " nativeLog.apply(originalConsole, arguments);", + " } else {", + " var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');", + " nativeLog(nativeMsg);", + " }", + " };", + "}", + "", + "function uncapture() {", + " console.log = originalConsole.log;", + "}", + "var oopsGlobal;", + "capture();" + ], + "tail": [ + "fun1();", + "fun2();", + "uncapture();", + "(function() { return logOutput || \"console.log never called\"; })();" + ] } } }, @@ -3057,8 +3304,31 @@ "// Now remove the console log line to pass the test", "" ], - "head": "var logOutput = \"\";\nvar originalConsole = console\nfunction capture() {\n var nativeLog = console.log;\n console.log = function (message) {\n logOutput = message;\n if(nativeLog.apply) {\n nativeLog.apply(originalConsole, arguments);\n } else {\n var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');\n nativeLog(nativeMsg);\n }\n };\n}\n\nfunction uncapture() {\n console.log = originalConsole.log;\n}\n", - "tail": "typeof myLocalScope === 'function' && (capture(), myLocalScope(), uncapture());\n(function() { return logOutput || \"console.log never called\"; })();" + "head": [ + "var logOutput = \"\";", + "var originalConsole = console", + "function capture() {", + " var nativeLog = console.log;", + " console.log = function (message) {", + " logOutput = message;", + " if(nativeLog.apply) {", + " nativeLog.apply(originalConsole, arguments);", + " } else {", + " var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');", + " nativeLog(nativeMsg);", + " }", + " };", + "}", + "", + "function uncapture() {", + " console.log = originalConsole.log;", + "}", + "" + ], + "tail": [ + "typeof myLocalScope === 'function' && (capture(), myLocalScope(), uncapture());", + "(function() { return logOutput || \"console.log never called\"; })();" + ] } } }, @@ -3126,8 +3396,8 @@ "", "myOutfit();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3200,8 +3470,8 @@ "", "console.log(minusSeven(10));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3260,8 +3530,13 @@ "// Only change code above this line", "var returnedValue = addFive();" ], - "head": "", - "tail": "var sum = 0;\nfunction addThree() {sum = sum + 3;}\naddThree();\naddFive();" + "head": [], + "tail": [ + "var sum = 0;", + "function addThree() {sum = sum + 3;}", + "addThree();", + "addFive();" + ] } } }, @@ -3332,8 +3607,10 @@ "", "" ], - "head": "", - "tail": "(function(){return \"processed = \" + processed})();" + "head": [], + "tail": [ + "(function(){return \"processed = \" + processed})();" + ] } } }, @@ -3403,8 +3680,33 @@ "console.log(nextInLine(testArr, 6)); // Modify this line to test", "console.log(\"After: \" + JSON.stringify(testArr));" ], - "head": "var logOutput = [];\nvar originalConsole = console\nfunction capture() {\n var nativeLog = console.log;\n console.log = function (message) {\n logOutput.push(message);\n if(nativeLog.apply) {\n nativeLog.apply(originalConsole, arguments);\n } else {\n var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');\n nativeLog(nativeMsg);\n }\n };\n}\n\nfunction uncapture() {\n console.log = originalConsole.log;\n}\n\ncapture();", - "tail": "uncapture();\ntestArr = [1,2,3,4,5];\n(function() { return logOutput.join(\"\\n\");})();" + "head": [ + "var logOutput = [];", + "var originalConsole = console", + "function capture() {", + " var nativeLog = console.log;", + " console.log = function (message) {", + " logOutput.push(message);", + " if(nativeLog.apply) {", + " nativeLog.apply(originalConsole, arguments);", + " } else {", + " var nativeMsg = Array.prototype.slice.apply(arguments).join(' ');", + " nativeLog(nativeMsg);", + " }", + " };", + "}", + "", + "function uncapture() {", + " console.log = originalConsole.log;", + "}", + "", + "capture();" + ], + "tail": [ + "uncapture();", + "testArr = [1,2,3,4,5];", + "(function() { return logOutput.join(\"\\n\");})();" + ] } } }, @@ -3458,8 +3760,10 @@ "// Only change code above this line.", "}" ], - "head": "", - "tail": "welcomeToBooleans();" + "head": [], + "tail": [ + "welcomeToBooleans();" + ] } } }, @@ -3550,8 +3854,8 @@ "// Change this value to test", "trueOrFalse(true);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3624,8 +3928,8 @@ "// Change this value to test", "testEqual(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3695,8 +3999,8 @@ "// Change this value to test", "testStrict(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3751,8 +4055,8 @@ "// Change this value to test", "compareEquality(10, \"10\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3827,8 +4131,8 @@ "// Change this value to test", "testNotEqual(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3907,8 +4211,8 @@ "// Change this value to test", "testStrictNotEqual(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3997,8 +4301,8 @@ "// Change this value to test", "testGreaterThan(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4087,8 +4391,8 @@ "// Change this value to test", "testGreaterOrEqual(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4171,8 +4475,8 @@ "// Change this value to test", "testLessThan(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4260,8 +4564,8 @@ "testLessOrEqual(10);", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4361,8 +4665,8 @@ "// Change this value to test", "testLogicalAnd(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4465,8 +4769,8 @@ "// Change this value to test", "testLogicalOr(15);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4552,8 +4856,8 @@ "testElse(4);", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4635,8 +4939,8 @@ "testElseIf(7);", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4712,8 +5016,8 @@ "// Change this value to test", "orderMyLogic(7);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4816,8 +5120,8 @@ "// Change this value to test", "testSize(7);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4911,8 +5215,8 @@ "// Change these values to test", "golfScore(5, 4);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4995,8 +5299,8 @@ "caseInSwitch(1);", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5083,8 +5387,8 @@ "switchOfStuff(1);", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5184,8 +5488,8 @@ "sequentialSizes(1);", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5291,8 +5595,8 @@ "chainToSwitch(7);", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5360,8 +5664,8 @@ "// Change these values to test", "isLess(10, 15);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5443,8 +5747,8 @@ "// Change values below to test your code", "abTest(2,2);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5527,8 +5831,8 @@ "// Note: Only the last will display", "cc(2); cc(3); cc(7); cc('K'); cc('A');" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5617,8 +5921,10 @@ " ", "};" ], - "head": "", - "tail": "(function(z){return z;})(myDog);" + "head": [], + "tail": [ + "(function(z){return z;})(myDog);" + ] } } }, @@ -5692,8 +5998,10 @@ "var hatValue = testObj; // Change this line", "var shirtValue = testObj; // Change this line" ], - "head": "", - "tail": "(function(a,b) { return \"hatValue = '\" + a + \"', shirtValue = '\" + b + \"'\"; })(hatValue,shirtValue);" + "head": [], + "tail": [ + "(function(a,b) { return \"hatValue = '\" + a + \"', shirtValue = '\" + b + \"'\"; })(hatValue,shirtValue);" + ] } } }, @@ -5769,8 +6077,10 @@ "var entreeValue = testObj; // Change this line", "var drinkValue = testObj; // Change this line" ], - "head": "", - "tail": "(function(a,b) { return \"entreeValue = '\" + a + \"', drinkValue = '\" + b + \"'\"; })(entreeValue,drinkValue);" + "head": [], + "tail": [ + "(function(a,b) { return \"entreeValue = '\" + a + \"', drinkValue = '\" + b + \"'\"; })(entreeValue,drinkValue);" + ] } } }, @@ -5853,8 +6163,10 @@ "var playerNumber; // Change this Line", "var player = testObj; // Change this Line" ], - "head": "", - "tail": "if(typeof player !== \"undefined\"){(function(v){return v;})(player);}" + "head": [], + "tail": [ + "if(typeof player !== \"undefined\"){(function(v){return v;})(player);}" + ] } } }, @@ -5935,8 +6247,10 @@ "", "" ], - "head": "", - "tail": "(function(z){return z;})(myDog);" + "head": [], + "tail": [ + "(function(z){return z;})(myDog);" + ] } } }, @@ -6008,8 +6322,10 @@ "// Only change code below this line.", "" ], - "head": "", - "tail": "(function(z){return z;})(myDog);" + "head": [], + "tail": [ + "(function(z){return z;})(myDog);" + ] } } }, @@ -6078,8 +6394,10 @@ "", "" ], - "head": "", - "tail": "(function(z){return z;})(myDog);" + "head": [], + "tail": [ + "(function(z){return z;})(myDog);" + ] } } }, @@ -6187,8 +6505,8 @@ "// Change this value to test", "phoneticLookup(\"charlie\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6256,8 +6574,8 @@ "// Test your code by modifying these values", "checkObj(\"gift\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6356,8 +6674,10 @@ "];", "" ], - "head": "", - "tail": "(function(x){ if (Array.isArray(x)) { return JSON.stringify(x); } return \"myMusic is not an array\"})(myMusic);" + "head": [], + "tail": [ + "(function(x){ if (Array.isArray(x)) { return JSON.stringify(x); } return \"myMusic is not an array\"})(myMusic);" + ] } } }, @@ -6422,8 +6742,15 @@ "var gloveBoxContents = undefined; // Change this line", "" ], - "head": "", - "tail": "(function(x) { \n if(typeof x != 'undefined') { \n return \"gloveBoxContents = \" + x;\n }\n return \"gloveBoxContents is undefined\";\n})(gloveBoxContents);" + "head": [], + "tail": [ + "(function(x) { ", + " if(typeof x != 'undefined') { ", + " return \"gloveBoxContents = \" + x;", + " }", + " return \"gloveBoxContents is undefined\";", + "})(gloveBoxContents);" + ] } } }, @@ -6497,8 +6824,15 @@ "var secondTree = \"\"; // Change this line", "" ], - "head": "", - "tail": "(function(x) { \n if(typeof x != 'undefined') { \n return \"secondTree = \" + x;\n }\n return \"secondTree is undefined\";\n})(secondTree);" + "head": [], + "tail": [ + "(function(x) { ", + " if(typeof x != 'undefined') { ", + " return \"secondTree = \" + x;", + " }", + " return \"secondTree is undefined\";", + "})(secondTree);" + ] } } }, @@ -6615,8 +6949,10 @@ "updateRecords(5439, \"artist\", \"ABBA\");", "" ], - "head": "", - "tail": ";(function(x) { return \"collection = \\n\" + JSON.stringify(x, '\\n', 2); })(collection);" + "head": [], + "tail": [ + ";(function(x) { return \"collection = \\n\" + JSON.stringify(x, '\\n', 2); })(collection);" + ] } } }, @@ -6677,8 +7013,10 @@ "", "" ], - "head": "", - "tail": "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + "head": [], + "tail": [ + "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + ] } } }, @@ -6756,8 +7094,10 @@ "", "" ], - "head": "", - "tail": "if (typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + "head": [], + "tail": [ + "if (typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + ] } } }, @@ -6825,8 +7165,10 @@ "", "" ], - "head": "", - "tail": "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + "head": [], + "tail": [ + "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + ] } } }, @@ -6900,8 +7242,10 @@ "", "" ], - "head": "", - "tail": "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + "head": [], + "tail": [ + "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + ] } } }, @@ -6972,8 +7316,10 @@ "", "" ], - "head": "", - "tail": "(function(){if(typeof total !== 'undefined') { return \"total = \" + total; } else { return \"total is undefined\";}})()" + "head": [], + "tail": [ + "(function(){if(typeof total !== 'undefined') { return \"total = \" + total; } else { return \"total is undefined\";}})()" + ] } } }, @@ -7037,8 +7383,8 @@ "multiplyAll([[1,2],[3,4],[5,6,7]]);", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7099,8 +7445,10 @@ "}", "" ], - "head": "", - "tail": "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + "head": [], + "tail": [ + "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}" + ] } } }, @@ -7205,8 +7553,8 @@ "// Change these values to test your function", "lookUpProfile(\"Akira\", \"likes\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7266,8 +7614,10 @@ " // Only change code above this line.", "}" ], - "head": "", - "tail": "(function(){return randomFraction();})();" + "head": [], + "tail": [ + "(function(){return randomFraction();})();" + ] } } }, @@ -7340,8 +7690,10 @@ " return Math.random();", "}" ], - "head": "", - "tail": "(function(){return randomWholeNum();})();" + "head": [], + "tail": [ + "(function(){return randomWholeNum();})();" + ] } } }, @@ -7418,8 +7770,23 @@ "// Change these values to test your function", "var myRandom = randomRange(5, 15);" ], - "head": "", - "tail": "var calcMin = 100;\nvar calcMax = -100;\nfor(var i = 0; i < 100; i++) {\n var result = randomRange(5,15);\n calcMin = Math.min(calcMin, result);\n calcMax = Math.max(calcMax, result);\n}\n(function(){\n if(typeof myRandom === 'number') {\n return \"myRandom = \" + myRandom;\n } else {\n return \"myRandom undefined\";\n }\n})();" + "head": [], + "tail": [ + "var calcMin = 100;", + "var calcMax = -100;", + "for(var i = 0; i < 100; i++) {", + " var result = randomRange(5,15);", + " calcMin = Math.min(calcMin, result);", + " calcMax = Math.max(calcMax, result);", + "}", + "(function(){", + " if(typeof myRandom === 'number') {", + " return \"myRandom = \" + myRandom;", + " } else {", + " return \"myRandom undefined\";", + " }", + "})();" + ] } } }, @@ -7472,8 +7839,8 @@ "", "convertToInteger(\"56\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7529,8 +7896,8 @@ "", "convertToInteger(\"10011\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7583,8 +7950,8 @@ "", "checkEqual(1, 2);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7635,13 +8002,10 @@ "", "checkSign(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/basic-javascript.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/debugging.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/debugging.json index b75fd44a78..95ad26ba04 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/debugging.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/debugging.json @@ -43,8 +43,8 @@ "let sumAB = a + b;", "console.log(sumAB);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -73,7 +73,7 @@ }, { "text": "Use console.clear() to modify your output so that outputOne variable only outputs once.", - "testString": "assert(code.match(/console\\.clear\\(\\)/g), 'Use console.clear() to modify your output so that outputOne variable only outputs once.');" + "testString": "assert(code.match(/(?console.clear() to modify your output so that outputOne variable only outputs once.');" } ], "solutions": [], @@ -101,8 +101,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -149,8 +149,8 @@ "// Add your code below this line", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -202,8 +202,8 @@ "let netWorkingCapital = recievables - payable;", "console.log(`Net working capital is: ${netWorkingCapital}`);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -242,8 +242,8 @@ "let arraySum = myArray.reduce((previous, current => previous + current);", "console.log(`Sum of array values is: ${arraySum}`);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -285,8 +285,8 @@ "let innerHtml = \"

Click here to return home

\";", "console.log(innerHtml);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -336,8 +336,8 @@ "", "console.log(result);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -382,8 +382,8 @@ "let result = getNine;", "console.log(result);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -426,8 +426,8 @@ "let power = raiseToPower(exp, base);", "console.log(power);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -483,8 +483,8 @@ "", "countToFive();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -543,8 +543,8 @@ "let matrix = zeroArray(3, 2);", "console.log(matrix);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -587,13 +587,10 @@ " }", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/debugging.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json index da4f162d02..a0aeb6fac7 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json @@ -11,7 +11,7 @@ "One of the biggest problems with declaring variables with the var keyword is that you can overwrite variable declarations without an error.", "
var camper = 'James';
var camper = 'David';
console.log(camper);
// logs 'David'
", "As you can see in the code above, the camper variable is originally declared as James and then overridden to be David.", - "In a small application, you might not run into this type of problem, but when your code becomes larger, you might accidently overwrite a variable that you did not intend to overwrite.", + "In a small application, you might not run into this type of problem, but when your code becomes larger, you might accidentally overwrite a variable that you did not intend to overwrite.", "Because this behavior does not throw an error, searching and fixing bugs becomes more difficult.
", "A new keyword called let was introduced in ES6 to solve this potential issue with the var keyword.", "If you were to replace var with let in the variable declarations of the code above, the result would be an error.", @@ -58,8 +58,8 @@ "}", "catTalk();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -71,7 +71,7 @@ "The let keyword behaves similarly, but with some extra features. When you declare a variable with the let keyword inside a block, statement, or expression, its scope is limited to that block, statement, or expression.", "For example:", "
var numArray = [];
for (var i = 0; i < 3; i++) {
numArray.push(i);
}
console.log(numArray);
// returns [0, 1, 2]
console.log(i);
// returns 3
", - "With the var keyword, i is declared globally. So when i++ is executed, it updates the global variable. This code is similiar to the following:", + "With the var keyword, i is declared globally. So when i++ is executed, it updates the global variable. This code is similar to the following:", "
var numArray = [];
var i;
for (i = 0; i < 3; i++) {
numArray.push(i);
}
console.log(numArray);
// returns [0, 1, 2]
console.log(i);
// returns 3
", "This behavior will cause problems if you were to create a function and store it for later use inside a for loop that uses the i variable. This is because the stored function will always refer to the value of the updated global i variable.", "
var printNumTwo;
for (var i = 0; i < 3; i++) {
if(i === 2){
printNumTwo = function() {
return i;
};
}
}
console.log(printNumTwo());
// returns 3
", @@ -106,7 +106,6 @@ "ext": "js", "name": "index", "contents": [ - "", "function checkScope() {", "\"use strict\";", " var i = \"function scope\";", @@ -118,8 +117,8 @@ " return i;", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -173,8 +172,8 @@ "}", "printManyTimes(\"freeCodeCamp\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -229,8 +228,8 @@ "}", "editInPlace();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -290,8 +289,8 @@ "}", "const PI = freezeObj();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -347,8 +346,8 @@ " return new Date();", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -401,8 +400,8 @@ "// test your code", "console.log(myConcat([1, 2], [3, 4, 5]));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -472,8 +471,8 @@ "const squaredIntegers = squareList(realNumberArray);", "console.log(squaredIntegers);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -521,8 +520,8 @@ "console.log(increment(5, 2)); // returns 7", "console.log(increment(5)); // returns NaN" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -535,7 +534,7 @@ "
function howMany(...args) {
return \"You have passed \" + args.length + \" arguments.\";
}
console.log(howMany(0, 1, 2)); // You have passed 3 arguments
console.log(howMany(\"string\", null, [1, 2, 3], { })); // You have passed 4 arguments.
", "The rest operator eliminates the need to check the args array and allows us to apply map(), filter() and reduce() on the parameters array.", "
", - "Modify the function sum so that is uses the rest operator and it works in the same way with any number of parameters." + "Modify the function sum so that it uses the rest operator and it works in the same way with any number of parameters." ], "tests": [ { @@ -578,8 +577,8 @@ "})();", "console.log(sum(1, 2, 3)); // 6" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -631,8 +630,8 @@ "})();", "console.log(arr2);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -689,8 +688,8 @@ "", "console.log(getLength('FreeCodeCamp'));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -740,8 +739,8 @@ "", "console.log(getMaxOfTmrw(LOCAL_FORECAST)); // should be 84.6" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -793,8 +792,8 @@ "console.log(a); // should be 6", "console.log(b); // should be 8" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -808,7 +807,7 @@ "Variables a and b take the first and second values from the array. After that, because of rest operator's presence, arr gets rest of the values in the form of an array.", "The rest element only works correctly as the last variable in the list. As in, you cannot use the rest operator to catch a subarray that leaves out last element of the original array.", "
", - "Use destructuring assignment with the rest operator to perform an effective Array.prototype.slice() so that arr is a sub-array of the original array source with the first two elements ommitted." + "Use destructuring assignment with the rest operator to perform an effective Array.prototype.slice() so that arr is a sub-array of the original array source with the first two elements omitted." ], "tests": [ { @@ -817,7 +816,7 @@ }, { "text": "destructuring was used.", - "testString": "getUserInput => assert(getUserInput('index').match(/\\[\\s*\\w\\s*,\\s*\\w\\s*,\\s*...arr\\s*\\]/g),'destructuring was used.');" + "testString": "getUserInput => assert(getUserInput('index').match(/\\[\\s*\\w*\\s*,\\s*\\w*\\s*,\\s*...arr\\s*\\]/g),'destructuring was used.');" }, { "text": "Array.slice() was not used.", @@ -846,8 +845,8 @@ "console.log(arr); // should be [3,4,5,6,7,8,9,10]", "console.log(source); // should be [1,2,3,4,5,6,7,8,9,10];" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -911,8 +910,8 @@ "console.log(stats); // should be object", "console.log(half(stats)); // should be 28.015" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -976,8 +975,8 @@ " **/", "const resultDisplayArray = makeList(result.failure);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -985,7 +984,7 @@ "id": "587d7b8a367417b2b2512b4f", "title": "Write Concise Object Literal Declarations Using Simple Fields", "description": [ - "ES6 adds some nice support for easily definining object literals.", + "ES6 adds some nice support for easily defining object literals.", "Consider the following code:", "
const getMousePosition = (x, y) => ({
x: x,
y: y
});
", "getMousePosition is a simple function that returns an object containing two fields.", @@ -1027,8 +1026,8 @@ "};", "console.log(createPerson(\"Zodiac Hasbro\", 56, \"male\")); // returns a proper object" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1075,8 +1074,8 @@ "bicycle.setGear(3);", "console.log(bicycle.gear);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1130,8 +1129,8 @@ "const carrot = new Vegetable('carrot');", "console.log(carrot.name); // => should be 'carrot'" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1147,7 +1146,7 @@ "Notice the syntax we are using to invoke the getter and setter - as if they are not even functions.", "Getters and setters are important, because they hide internal implementation details.", "
", - "Use class keyword to create a Thermostat class. The constructor accepts Farenheit temperature.", + "Use class keyword to create a Thermostat class. The constructor accepts Fahrenheit temperature.", "Now create getter and setter in the class, to obtain the temperature in Celsius scale.", "Remember that C = 5/9 * (F - 32) and F = C * 9.0 / 5 + 32, where F is the value of temperature in Fahrenheit scale, and C is the value of the same temperature in Celsius scale", "Note", @@ -1187,13 +1186,13 @@ " return Thermostat;", "}", "const Thermostat = makeClass();", - "const thermos = new Thermostat(76); // setting in Farenheit scale", + "const thermos = new Thermostat(76); // setting in Fahrenheit scale", "let temp = thermos.temperature; // 24.44 in C", "thermos.temperature = 26;", "temp = thermos.temperature; // 26 in C" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1210,7 +1209,7 @@ "There are a few ways to write an import statement, but the above is a very common use-case.", "Note
The whitespace surrounding the function inside the curly braces is a best practice - it makes it easier to read the import statement.", "Note
The lessons in this section handle non-browser features. import, and the statements we introduce in the rest of these lessons, won't work on a browser directly. However, we can use various tools to create code out of this to make it work in browser.", - "Note
In most cases, the file path requires a ./ before it; otherwise, node will look in the node_modules directory first trying to load it as a dependencie.", + "Note
In most cases, the file path requires a ./ before it; otherwise, node will look in the node_modules directory first trying to load it as a dependency.", "
", "Add the appropriate import statement that will allow the current file to use the capitalizeString function. The file where this function lives is called \"string_functions\", and it is in the same directory as the current file." ], @@ -1233,8 +1232,14 @@ "\"use strict\";", "capitalizeString(\"hello!\");" ], - "head": "window.require = function (str) {\nif (str === 'string_functions') {\nreturn {\ncapitalizeString: str => str.toUpperCase()\n}}};", - "tail": "" + "head": [ + "window.require = function (str) {", + "if (str === 'string_functions') {", + "return {", + "capitalizeString: str => str.toUpperCase()", + "}}};" + ], + "tail": [] } } }, @@ -1275,8 +1280,10 @@ "const foo = \"bar\";", "const boo = \"far\";" ], - "head": "window.exports = function(){};", - "tail": "" + "head": [ + "window.exports = function(){};" + ], + "tail": [] } } }, @@ -1286,7 +1293,7 @@ "description": [ "Suppose you have a file that you wish to import all of its contents into the current file. This can be done with the import * syntax.", "Here's an example where the contents of a file named \"math_functions\" are imported into a file in the same directory:", - "
import * as myMathModule from \"math_functions\"
myMathModule.add(2,3);
myMathModule.subtract(5,3);
", + "
import * as myMathModule from \"math_functions\";
myMathModule.add(2,3);
myMathModule.subtract(5,3);
", "And breaking down that code:", "
import * as object_with_name_of_your_choice from \"file_path_goes_here\"
object_with_name_of_your_choice.imported_function
", "You may use any name following the import * as portion of the statement. In order to utilize this method, it requires an object that receives the imported values. From here, you will use the dot notation to call your imported values.", @@ -1296,7 +1303,7 @@ "tests": [ { "text": "Properly uses import * as syntax.", - "testString": "getUserInput => assert(getUserInput('index').match(/import\\s+\\*\\s+as\\s+myStringModule\\s+from\\s+\"capitalize_strings\"/g), 'Properly uses import * as syntax.');" + "testString": "assert(code.match(/import\\s+\\*\\s+as\\s+[a-zA-Z0-9_$]+\\s+from\\s*\"\\s*capitalize_strings\\s*\"\\s*;/gi), 'Properly uses import * as syntax.');" } ], "type": "waypoint", @@ -1309,12 +1316,17 @@ "ext": "js", "name": "index", "contents": [ - "\"use strict\";", - "myStringModule.capitalize(\"foo\");", - "myStringModule.lowercase(\"Foo\");" + "\"use strict\";" ], - "head": "window.require = function(str) {\nif (str === 'capitalize_strings') {\nreturn {\ncapitalize: str => str.toUpperCase(),\nlowercase: str => str.toLowerCase()\n}}};", - "tail": "" + "head": [ + "window.require = function(str) {", + "if (str === 'capitalize_strings') {", + "return {", + "capitalize: str => str.toUpperCase(),", + "lowercase: str => str.toLowerCase()", + "}}};" + ], + "tail": [] } } }, @@ -1349,8 +1361,10 @@ "\"use strict\";", "function subtract(x,y) {return x - y;}" ], - "head": "window.exports = function(){};", - "tail": "" + "head": [ + "window.exports = function(){};" + ], + "tail": [] } } }, @@ -1384,13 +1398,16 @@ "\"use strict\";", "subtract(7,4);" ], - "head": "window.require = function(str) {\nif (str === 'math_functions') {\nreturn function(a, b) {\nreturn a - b;\n}}};", - "tail": "" + "head": [ + "window.require = function(str) {", + "if (str === 'math_functions') {", + "return function(a, b) {", + "return a - b;", + "}}};" + ], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/es6.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/functional-programming.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/functional-programming.json index ccb58561bb..86cfb85ff8 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/functional-programming.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/functional-programming.json @@ -69,8 +69,8 @@ "", "console.log(tea4TeamFCC);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -159,8 +159,8 @@ " tea4BlackTeamFCC", ");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -177,7 +177,7 @@ "A Window object is made up of tabs, and you usually have more than one Window open. The titles of each open site in each Window object is held in an array. After working in the browser (opening new tabs, merging windows, and closing tabs), you want to print the tabs that are still open. Closed tabs are removed from the array and new tabs (for simplicity) get added to the end of it.", "The code editor shows an implementation of this functionality with functions for tabOpen(), tabClose(), and join(). The array tabs is part of the Window object that stores the name of the open pages.", "

Instructions

", - "Run the code in the editor. It's using a method that has side effects in the program, causing incorrect output. The final list of open tabs should be ['FB', 'Gitter', 'Reddit', 'Twitter', 'Medium', 'Netflix', 'YouTube', 'Vine', 'GMail', 'Work mail', 'Docs', 'freeCodeCamp', 'new tab'] but the output will be slightly different.", + "Run the code in the editor. It's using a method that has side effects in the program, causing incorrect output. The final list of open tabs should be ['FB', 'Gitter', 'Reddit', 'Twitter', 'Medium', 'new tab', 'Netflix', 'YouTube', 'Vine', 'GMail', 'Work mail', 'Docs', 'freeCodeCamp', 'new tab'] but the output will be slightly different.", "Work through the code and see if you can figure out the problem, then advance to the next challenge to learn more." ], "tests": [ @@ -236,8 +236,8 @@ "", "alert(finalTabs.tabs);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -288,8 +288,8 @@ "var newValue = incrementer(); // Should equal 5", "console.log(fixedValue); // Should print 4" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -345,8 +345,8 @@ "var newValue = incrementer(fixedValue); // Should equal 5", "console.log(fixedValue); // Should print 4" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -427,8 +427,8 @@ "", "console.log(bookList);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -598,8 +598,8 @@ "", "console.log(rating); " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -651,8 +651,8 @@ " return item * 2;", "});" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -816,8 +816,8 @@ "", "console.log(filteredList); " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -867,8 +867,8 @@ " return item % 2 === 1;", "});" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -924,8 +924,8 @@ "var inputAnim = [\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"];", "sliceArray(inputAnim, 1, 3);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -978,8 +978,8 @@ "var inputCities = [\"Chicago\", \"Delhi\", \"Islamabad\", \"London\", \"Berlin\"];", "nonMutatingSplice(inputCities);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1031,8 +1031,8 @@ "var second = [4, 5];", "nonMutatingConcat(first, second);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1090,8 +1090,8 @@ "var second = [4, 5];", "nonMutatingPush(first, second);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1261,8 +1261,8 @@ "", "console.log(averageRating); " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1314,8 +1314,8 @@ "}", "alphabeticalOrder([\"a\", \"d\", \"c\", \"a\", \"z\", \"g\"]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1365,8 +1365,8 @@ "}", "nonMutatingSort(globalArray);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1420,8 +1420,8 @@ "}", "splitify(\"Hello World,I-am code\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1482,8 +1482,8 @@ "}", "sentensify(\"May-the-force-be-with-you\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1553,8 +1553,8 @@ "", "var winterComing = urlSlug(globalTitle); // Should be \"winter-is-coming\"" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1605,8 +1605,8 @@ "}", "checkPositive([1, 2, 3, -4, 5]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1657,8 +1657,8 @@ "}", "checkPositive([1, 2, 3, -4, 5]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1715,13 +1715,10 @@ "}", "add(10)(20)(30);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/functional-programming.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting.json index e605535a8a..a5e6d94d01 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting.json @@ -80,8 +80,8 @@ "", "sumAll([1, 4]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -198,8 +198,8 @@ "", "diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -277,8 +277,8 @@ "", "destroyer([1, 2, 3, 1, 2, 3], 2, 3);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -363,8 +363,8 @@ "", "whatIsInAName([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" });" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -437,8 +437,8 @@ "", "spinalCase('This Is Spinal Tap');" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -529,8 +529,8 @@ "", "translatePigLatin(\"consonant\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -614,8 +614,8 @@ "", "myReplace(\"A quick brown fox jumped over the lazy dog\", \"jumped\", \"leaped\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -690,8 +690,8 @@ "", "pairElement(\"GCG\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -765,8 +765,8 @@ "", "fearNotLetter(\"abce\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -842,8 +842,8 @@ "", "uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -924,8 +924,8 @@ "", "convertHTML(\"Dolce & Gabbana\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1005,8 +1005,8 @@ "", "sumFibs(4);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1075,8 +1075,8 @@ "", "sumPrimes(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1157,8 +1157,8 @@ "", "smallestCommons([1,5]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1238,8 +1238,8 @@ "", "dropElements([1, 2, 3], function(n) {return n < 3; });" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1306,8 +1306,8 @@ "", "steamrollArray([1, [2], [3, [[4]]]]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1369,8 +1369,8 @@ "", "binaryAgent(\"01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1463,8 +1463,8 @@ "", "truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\", \"sex\": \"male\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1551,8 +1551,8 @@ "", "addTogether(2,3);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1678,8 +1678,8 @@ "var bob = new Person('Bob Ross');", "bob.getFullName();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1761,13 +1761,10 @@ "", "orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects.json index b158de49f8..b63aa6001d 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects.json @@ -118,8 +118,8 @@ "", "palindrome(\"eye\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -279,8 +279,8 @@ "", "convertToRoman(36);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -359,8 +359,8 @@ "// Change the inputs below to test", "rot13(\"SERR PBQR PNZC\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -538,8 +538,8 @@ "", "telephoneCheck(\"555-555-5555\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -650,13 +650,10 @@ "", "checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json index 7ad044b9cb..bcc8c19054 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json @@ -49,8 +49,8 @@ " ", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -96,8 +96,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -145,8 +145,8 @@ "", "dog.sayLegs();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -188,7 +188,6 @@ "ext": "js", "name": "index", "contents": [ - "", "let dog = {", " name: \"Spot\",", " numLegs: 4,", @@ -197,8 +196,8 @@ "", "dog.sayLegs();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -242,13 +241,9 @@ "key": "indexjs", "ext": "js", "name": "index", - "contents": [ - "", - "", - "" - ], - "head": "", - "tail": "" + "contents": [], + "head": [], + "tail": [] } } }, @@ -299,8 +294,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -360,8 +355,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -411,8 +406,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -465,8 +460,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -522,8 +517,8 @@ "// Add your code above this line", "let beagle = new Dog(\"Snoopy\");" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -582,8 +577,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -638,8 +633,8 @@ "}", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -697,8 +692,8 @@ " ", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -749,8 +744,8 @@ " }", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -795,8 +790,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -848,8 +843,8 @@ "???.isPrototypeOf(Dog.prototype);", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -924,8 +919,8 @@ " ", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -995,8 +990,8 @@ "duck.eat(); // Should print \"nom nom nom\"", "beagle.eat(); // Should print \"nom nom nom\" " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1050,8 +1045,8 @@ "let beagle = new Dog();", "beagle.eat(); // Should print \"nom nom nom\"" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1113,8 +1108,8 @@ "let duck = new Bird();", "let beagle = new Dog();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1187,8 +1182,8 @@ "beagle.eat(); // Should print \"nom nom nom\"", "beagle.bark(); // Should print \"Woof!\"" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1252,8 +1247,8 @@ "let penguin = new Penguin();", "console.log(penguin.fly());" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1318,8 +1313,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1367,8 +1362,8 @@ "}", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1412,8 +1407,8 @@ "", "makeNest(); " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1470,13 +1465,10 @@ " };", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/object-oriented-programming.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json index a755cd3b5f..edc1fb148b 100644 --- a/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json +++ b/packages/learn/seed/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json @@ -41,8 +41,8 @@ "let myRegex = /Hello/;", "let result = myRegex; // Change this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -88,8 +88,8 @@ "let waldoRegex = /search/; // Change this line", "let result = waldoRegex.test(waldoIsHiding);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -150,8 +150,8 @@ "let petRegex = /change/; // Change this line", "let result = petRegex.test(petString);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -223,8 +223,8 @@ "let fccRegex = /change/; // Change this line", "let result = fccRegex.test(myString);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -268,8 +268,8 @@ "let codingRegex = /change/; // Change this line", "let result = extractStr; // Change this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -319,8 +319,8 @@ "let starRegex = /change/; // Change this line", "let result = twinkleStar; // Change this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -392,8 +392,8 @@ "let unRegex = /change/; // Change this line", "let result = unRegex.test(exampleStr);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -447,8 +447,8 @@ "let vowelRegex = /change/; // Change this line", "let result = vowelRegex; // Change this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -462,7 +462,7 @@ "
let catStr = \"cat\";
let batStr = \"bat\";
let matStr = \"mat\";
let bgRegex = /[a-e]at/;
catStr.match(bgRegex); // Returns [\"cat\"]
batStr.match(bgRegex); // Returns [\"bat\"]
matStr.match(bgRegex); // Returns null
", "
", "Match all the letters in the string quoteSample.", - "Note
Be sure to match both upper- and lowercase vowels." + "Note
Be sure to match both upper- and lowercase letters." ], "tests": [ { @@ -494,8 +494,8 @@ "let alphabetRegex = /change/; // Change this line", "let result = alphabetRegex; // Change this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -540,8 +540,8 @@ "let myRegex = /change/; // Change this line", "let result = myRegex; // Change this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -585,8 +585,8 @@ "let myRegex = /change/; // Change this line", "let result = myRegex; // Change this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -631,8 +631,8 @@ "let myRegex = /change/; // Change this line", "let result = difficultSpelling.match(myRegex);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -684,8 +684,8 @@ "let chewieRegex = /change/; // Change this line", "let result = chewieQuote.match(chewieRegex);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -722,8 +722,8 @@ "let myRegex = /<.*>/; // Change this line", "let result = text.match(myRegex);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -790,8 +790,8 @@ "let matchedCriminals = crowd.match(reCriminals);", "console.log(matchedCriminals);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -839,8 +839,8 @@ "let calRegex = /change/; // Change this line", "let result = calRegex.test(rickyAndCal);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -884,8 +884,8 @@ "let lastRegex = /change/; // Change this line", "let result = lastRegex.test(caboose);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -938,8 +938,8 @@ "let alphabetRegexV2 = /change/; // Change this line", "let result = quoteSample.match(alphabetRegexV2).length;" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -991,8 +991,8 @@ "let nonAlphabetRegex = /change/; // Change this line", "let result = quoteSample.match(nonAlphabetRegex).length;" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1055,8 +1055,8 @@ "let numRegex = /change/; // Change this line", "let result = numString.match(numRegex).length;" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1119,8 +1119,8 @@ "let noNumRegex = /change/; // Change this line", "let result = numString.match(noNumRegex).length;" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1178,8 +1178,8 @@ "let userCheck = /change/; // Change this line", "let result = userCheck.test(username);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1227,8 +1227,8 @@ "let countWhiteSpace = /change/; // Change this line", "let result = sample.match(countWhiteSpace);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1276,8 +1276,8 @@ "let countNonWhiteSpace = /change/; // Change this line", "let result = sample.match(countNonWhiteSpace);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1338,8 +1338,8 @@ "let ohRegex = /change/; // Change this line", "let result = ohRegex.test(ohStr);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1400,8 +1400,8 @@ "let haRegex = /change/; // Change this line", "let result = haRegex.test(haStr);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1458,8 +1458,8 @@ "let timRegex = /change/; // Change this line", "let result = timRegex.test(timStr);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1508,8 +1508,8 @@ "let favRegex = /change/; // Change this line", "let result = favRegex.test(favWord);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1574,8 +1574,8 @@ "let pwRegex = /change/; // Change this line", "let result = pwRegex.test(sampleWord);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1650,8 +1650,8 @@ "let reRegex = /change/; // Change this line", "let result = reRegex.test(repeatNum);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1698,8 +1698,8 @@ "let replaceText = \"\"; // Change this line", "let result = huhText.replace(fixRegex, replaceText);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1744,13 +1744,10 @@ "let wsRegex = /change/; // Change this line", "let result = hello; // Change this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "02-javascript-algorithms-and-data-structures/regular-expressions.json", - "superBlock": "javascript-algorithms-and-data-structures", - "superOrder": 2 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/03-front-end-libraries/bootstrap.json b/packages/learn/seed/challenges/03-front-end-libraries/bootstrap.json index f23caca85e..ce1ad7cf35 100644 --- a/packages/learn/seed/challenges/03-front-end-libraries/bootstrap.json +++ b/packages/learn/seed/challenges/03-front-end-libraries/bootstrap.json @@ -64,7 +64,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -124,8 +124,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -182,7 +182,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -244,8 +244,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -288,7 +288,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -351,8 +351,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -361,16 +361,16 @@ "title": "Create a Bootstrap Button", "description": [ "Bootstrap has its own styles for button elements, which look much better than the plain HTML ones.", - "Create a new button element below your large kitten photo. Give it the class btn and the text of \"Like\"." + "Create a new button element below your large kitten photo. Give it the btn and btn-default classes, as well as the text of \"Like\"." ], "tests": [ { "text": "Create a new button element with the text \"Like\".", - "testString": "assert(new RegExp(\"like\",\"gi\").test($(\"button\").text()), 'Create a new button element with the text \"Like\".');" + "testString": "assert(new RegExp(\"like\",\"gi\").test($(\"button\").text()) && ($(\"img.img-responsive + button.btn\").length > 0), 'Create a new button element with the text \"Like\".');" }, { - "text": "Your new button should have the class btn.", - "testString": "assert($(\"button\").hasClass(\"btn\"), 'Your new button should have the class btn.');" + "text": "Your new button should have two classes: btn and btn-default.", + "testString": "assert($(\"button\").hasClass(\"btn\") && $(\"button\").hasClass(\"btn-default\"), 'Your new button should have two classes: btn and btn-default.');" }, { "text": "Make sure all your button elements have a closing tag.", @@ -396,7 +396,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -460,8 +460,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -469,21 +469,21 @@ "id": "bad87fee1348cd8acef08812", "title": "Create a Block Element Bootstrap Button", "description": [ - "Normally, your button elements with a class of btn are only as wide as the text that they contain. For example:", - "<button class=\"btn\">Submit</button>", + "Normally, your button elements with the btn and btn-default classes are only as wide as the text that they contain. For example:", + "<button class=\"btn btn-default\">Submit</button>", "This button would only be as wide as the word \"Submit\".", - "", + "", "By making them block elements with the additional class of btn-block, your button will stretch to fill your page's entire horizontal space and any elements following it will flow onto a \"new line\" below the block.", - "<button class=\"btn btn-block\">Submit</button>", + "<button class=\"btn btn-default btn-block\">Submit</button>", "This button would take up 100% of the available width.", - "", + "", "Note that these buttons still need the btn class.", "Add Bootstrap's btn-block class to your Bootstrap button." ], "tests": [ { - "text": "Your button should still have the class btn.", - "testString": "assert($(\"button\").hasClass(\"btn\"), 'Your button should still have the class btn.');" + "text": "Your button should still have the btn and btn-default classes.", + "testString": "assert($(\"button\").hasClass(\"btn\") && $(\"button\").hasClass(\"btn-default\"), 'Your button should still have the btn and btn-default classes.');" }, { "text": "Your button should have the class btn-block.", @@ -529,7 +529,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -569,7 +569,7 @@ " \"A", "", " \"Three", - " ", + " ", "

Things cats love:

", "
    ", "
  • cat nip
  • ", @@ -593,8 +593,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -603,7 +603,7 @@ "title": "Taste the Bootstrap Button Color Rainbow", "description": [ "The btn-primary class is the main color you'll use in your app. It is useful for highlighting actions you want your user to take.", - "Add Bootstrap's btn-primary class to your button.", + "Replace Bootstrap's btn-default class by btn-primary in your button.", "Note that this button will still need the btn and btn-block classes." ], "tests": [ @@ -641,7 +641,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -681,7 +681,7 @@ " \"A", "", " \"Three", - " ", + " ", "

    Things cats love:

    ", "
      ", "
    • cat nip
    • ", @@ -705,8 +705,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -757,7 +757,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -821,8 +821,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -873,7 +873,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -938,8 +938,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1001,7 +1001,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1067,8 +1067,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1129,7 +1129,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1203,8 +1203,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1268,7 +1268,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1329,8 +1329,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1396,7 +1396,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1456,8 +1456,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1527,7 +1527,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1590,8 +1590,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1642,7 +1642,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1705,8 +1705,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1757,7 +1757,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1820,8 +1820,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1872,7 +1872,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1942,8 +1942,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1998,7 +1998,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2076,8 +2076,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2134,7 +2134,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2212,8 +2212,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2271,17 +2271,13 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", - "contents": [ - "", - "", - "" - ], - "head": "", - "tail": "" + "contents": [], + "head": [], + "tail": [] } } }, @@ -2325,7 +2321,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2334,8 +2330,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2383,7 +2379,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2394,8 +2390,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2435,7 +2431,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2448,8 +2444,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2493,7 +2489,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2510,8 +2506,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2555,7 +2551,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2580,8 +2576,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2622,7 +2618,7 @@ }, "guideUrl": "https://guide.freecodecamp.org/certificates/apply-the-default-bootstrap-button-style", "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2647,8 +2643,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2684,7 +2680,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2709,8 +2705,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2762,7 +2758,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2787,8 +2783,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2839,7 +2835,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2866,8 +2862,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2926,7 +2922,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2953,8 +2949,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3010,7 +3006,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3037,8 +3033,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3092,7 +3088,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -3119,13 +3115,10 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "03-front-end-libraries/bootstrap.json", - "superBlock": "front-end-libraries", - "superOrder": 3 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/03-front-end-libraries/front-end-libraries-projects.json b/packages/learn/seed/challenges/03-front-end-libraries/front-end-libraries-projects.json index d097a3b086..d14c838646 100644 --- a/packages/learn/seed/challenges/03-front-end-libraries/front-end-libraries-projects.json +++ b/packages/learn/seed/challenges/03-front-end-libraries/front-end-libraries-projects.json @@ -8,8 +8,20 @@ "id": "bd7158d8c442eddfaeb5bd13", "title": "Build a Random Quote Machine", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/qRZeGZ.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use any mix of HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux, and jQuery to complete this project. You should use a frontend framework (like React for example) because this section is about learning frontend frameworks. Additional technologies not listed above are not recommended and using them is at your own risk. We are looking at supporting other frontend frameworks like Angular and Vue, but they are not currently supported. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: I can see a wrapper element with a corresponding id=\"quote-box\".", + "User Story #2: Within #quote-box, I can see an element with a corresponding id=\"text\".", + "User Story #3: Within #quote-box, I can see an element with a corresponding id=\"author\".", + "User Story #4: Within #quote-box, I can see a clickable element with a corresponding id=\"new-quote\".", + "User Story #5: Within #quote-box, I can see a clickable element with a corresponding id=\"tweet-quote\".", + "User Story #6: On first load, my quote machine displays a random quote in the element with id=\"text\".", + "User Story #7: On first load, my quote machine displays the random quote's author in the element with id=\"author\".", + "User Story #8: When the #new-quote button is clicked, my quote machine should fetch a new quote and display it in the #text element.", + "User Story #9: My quote machine should fetch the new quote's author when the #new-quote button is clicked and display it in the #author element.", + "User Story #10: I can tweet the current quote by clicking on the #tweet-quote a element. This a element should include the \"twitter.com/intent/tweet\" path in it's href attribute to tweet the current quote.", + "User Story #11: The #quote-box wrapper element should be horizontally centered. Please run tests with browser's zoom level at 100% and page maximized.", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js", "Once you're done, submit the URL to your working project with all its tests passing.", "Remember to use the Read-Search-Ask method if you get stuck." @@ -31,8 +43,17 @@ "id": "bd7157d8c242eddfaeb5bd13", "title": "Build a Markdown Previewer", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/GrZVVO.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use any mix of HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux, and jQuery to complete this project. You should use a frontend framework (like React for example) because this section is about learning frontend frameworks. Additional technologies not listed above are not recommended and using them is at your own risk. We are looking at supporting other frontend frameworks like Angular and Vue, but they are not currently supported. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: I can see a textarea element with a corresponding id=\"editor\".", + "User Story #2: I can see an element with a corresponding id=\"preview\".", + "User Story #3: When I enter text into the #editor element, the #preview element is updated as I type to display the content of the textarea.", + "User Story #4: When I enter GitHub flavored markdown into the #editor element, the text is rendered as HTML in the #preview element as I type (HINT: You don't need to parse Markdown yourself - you can import the Marked library for this: https://cdnjs.com/libraries/marked).", + "User Story #5: When my markdown previewer first loads, the default text in the #editor field should contain valid markdown that represents at least one of each of the following elements: a header (H1 size), a sub header (H2 size), a link, inline code, a code block, a list item, a blockquote, an image, and bolded text.", + "User Story #6: When my markdown previewer first loads, the default markdown in the #editor field should be rendered as HTML in the #preview element.", + "Optional Bonus (you do not need to make this test pass): When I click a link rendered by my markdown previewer, the link is opened up in a new tab (HINT: read the Marked.js docs for this one!).", + "Optional Bonus (you do not need to make this test pass): My markdown previewer interprets carriage returns and renders them as br (line break) elements.", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js", "Once you're done, submit the URL to your working project with all its tests passing.", "Remember to use the Read-Search-Ask method if you get stuck." @@ -55,8 +76,16 @@ "id": "587d7dbc367417b2b2512bae", "title": "Build a Drum Machine", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/MJyNMd.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use any mix of HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux, and jQuery to complete this project. You should use a frontend framework (like React for example) because this section is about learning frontend frameworks. Additional technologies not listed above are not recommended and using them is at your own risk. We are looking at supporting other frontend frameworks like Angular and Vue, but they are not currently supported. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: I should be able to see an outer container with a corresponding id=\"drum-machine\" that contains all other elements.", + "User Story #2: Within #drum-machine I can see an element with a corresponding id=\"display\".", + "User Story #3: Within #drum-machine I can see 9 clickable drum pad elements, each with a class name of drum-pad, a unique id that describes the audio clip the drum pad will be set up to trigger, and an inner text that corresponds to one of the following keys on the keyboard: Q, W, E, A, S, D, Z, X, C. The drum pads MUST be in this order.", + "User Story #4: Within each .drum-pad, there should be an HTML5 audio element which has a src attribute pointing to an audio clip, a class name of clip, and an id corresponding to the inner text of its parent .drum-pad (e.g. id=\"Q\", id=\"W\", id=\"E\" etc.).", + "User Story #5: When I click on a .drum-pad element, the audio clip contained in its child audio element should be triggered.", + "User Story #6: When I press the trigger key associated with each .drum-pad, the audio clip contained in its child audio element should be triggered (e.g. pressing the Q key should trigger the drum pad which contains the string \"Q\", pressing the W key should trigger the drum pad which contains the string \"W\", etc.).", + "User Story #7: When a .drum-pad is triggered, a string describing the associated audio clip is displayed as the inner text of the #display element (each string must be unique).", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js", "Once you're done, submit the URL to your working project with all its tests passing.", "Remember to use the Read-Search-Ask method if you get stuck." @@ -79,8 +108,24 @@ "id": "bd7158d8c442eddfaeb5bd17", "title": "Build a JavaScript Calculator", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/wgGVVX.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use any mix of HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux, and jQuery to complete this project. You should use a frontend framework (like React for example) because this section is about learning frontend frameworks. Additional technologies not listed above are not recommended and using them is at your own risk. We are looking at supporting other frontend frameworks like Angular and Vue, but they are not currently supported. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: My calculator should contain a clickable element containing an = (equal sign) with a corresponding id=\"equals\".", + "User Story #2: My calculator should contain 10 clickable elements containing one number each from 0-9, with the following corresponding IDs: id=\"zero\", id=\"one\", id=\"two\", id=\"three\", id=\"four\", id=\"five\", id=\"six\", id=\"seven\", id=\"eight\", and id=\"nine\".", + "User Story #3: My calculator should contain 4 clickable elements each containing one of the 4 primary mathematical operators with the following corresponding IDs: id=\"add\", id=\"subtract\", id=\"multiply\", id=\"divide\".", + "User Story #4: My calculator should contain a clickable element containing a . (decimal point) symbol with a corresponding id=\"decimal\".", + "User Story #5: My calculator should contain a clickable element with an id=\"clear\".", + "User Story #6: My calculator should contain an element to display values with a corresponding id=\"display\".", + "User Story #7: At any time, pressing the clear button clears the input and output values, and returns the calculator to its initialized state; 0 should be shown in the element with the id of display.", + "User Story #8: As I input numbers, I should be able to see my input in the element with the id of display.", + "User Story #9: In any order, I should be able to add, subtract, multiply and divide a chain of numbers of any length, and when I hit =, the correct result should be shown in the element with the id of display.", + "User Story #10: When inputting numbers, my calculator should not allow a number to begin with multiple zeros.", + "User Story #11: When the decimal element is clicked, a . should append to the currently displayed value; two . in one number should not be accepted.", + "User Story #12: I should be able to perform any operation (+, -, *, /) on numbers containing decimal points.", + "User Story #13: If 2 or more operators are entered consecutively, the operation performed should be the last operator entered.", + "User Story #14: Pressing an operator immediately following = should start a new calculation that operates on the result of the previous evaluation.", + "User Story #15: My calculator should have several decimal places of precision when it comes to rounding (note that there is no exact standard, but you should be able to handle calculations like 2 / 7 with reasonable precision to at least 4 decimal places).", "Note On Calculator Logic: It should be noted that there are two main schools of thought on calculator input logic: immediate execution logic and formula logic. Our example utilizes formula logic and observes order of operation precedence, immediate execution does not. Either is acceptable, but please note that depending on which you choose, your calculator may yield different results than ours for certain equations (see below example). As long as your math can be verified by another production calculator, please do not consider this a bug.", "EXAMPLE: 3 + 5 x 6 - 2 / 4 =
      • Immediate Execution Logic: 11.5
      • Formula/Expression Logic: 32.5
      ", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js", @@ -101,8 +146,37 @@ "id": "bd7158d8c442eddfaeb5bd0f", "title": "Build a Pomodoro Clock", "description": [ - "Fulfill the user stories by getting all of the tests to pass. Use whichever libraries you need. Give it your own personal style.", - "Here's a working example. Try not to look at its code.", + "Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/XpKrrW.", + "Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.", + "You can use any mix of HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux, and jQuery to complete this project. You should use a frontend framework (like React for example) because this section is about learning frontend frameworks. Additional technologies not listed above are not recommended and using them is at your own risk. We are looking at supporting other frontend frameworks like Angular and Vue, but they are not currently supported. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!", + "User Story #1: I can see an element with id=\"break-label\" that contains a string (e.g. \"Break Length\").", + "User Story #2: I can see an element with id=\"session-label\" that contains a string (e.g. \"Session Length\").", + "User Story #3: I can see two clickable elements with corresponding IDs: id=\"break-decrement\" and id=\"session-decrement\".", + "User Story #4: I can see two clickable elements with corresponding IDs: id=\"break-increment\" and id=\"session-increment\".", + "User Story #5: I can see an element with a corresponding id=\"break-length\", which by default (on load) displays a value of 5.", + "User Story #6: I can see an element with a corresponding id=\"session-length\", which by default displays a value of 25.", + "User Story #7: I can see an element with a corresponding id=\"timer-label\", that contains a string indicating a session is initialized (e.g. \"Session\").", + "User Story #8: I can see an element with corresponding id=\"time-left\". NOTE: Paused or running, the value in this field should always be displayed in mm:ss format (i.e. 25:00).", + "User Story #9: I can see a clickable element with a corresponding id=\"start_stop\".", + "User Story #10: I can see a clickable element with a corresponding id=\"reset\".", + "User Story #11: When I click the element with the id of reset, any running timer should be stopped, the value within id=\"break-length\" should return to 5, the value within id=\"session-length\" should return to 25, and the element with id=\"time-left\" should reset to it's default state.", + "User Story #12: When I click the element with the id of break-decrement, the value within id=\"break-length\" decrements by a value of 1, and I can see the updated value.", + "User Story #13: When I click the element with the id of break-increment, the value within id=\"break-length\" increments by a value of 1, and I can see the updated value.", + "User Story #14: When I click the element with the id of session-decrement, the value within id=\"session-length\" decrements by a value of 1, and I can see the updated value.", + "User Story #15: When I click the element with the id of session-increment, the value within id=\"session-length\" increments by a value of 1, and I can see the updated value.", + "User Story #16: I should not be able to set a session or break length to <= 0.", + "User Story #17: I should not be able to set a session or break length to > 60.", + "User Story #18: When I first click the element with id=\"start_stop\", the timer should begin running from the value currently displayed in id=\"session-length\", even if the value has been incremented or decremented from the original value of 25.", + "User Story #19: If the timer is running, the element with the id of time-left should display the remaining time in mm:ss format (decrementing by a value of 1 and updating the display every 1000ms).", + "User Story #20: If the timer is running and I click the element with id=\"start_stop\", the countdown should pause.", + "User Story #21: If the timer is paused and I click the element with id=\"start_stop\", the countdown should resume running from the point at which it was paused.", + "User Story #22: When a session countdown reaches zero (NOTE: timer MUST reach 00:00), and a new countdown begins, the element with the id of timer-label should display a string indicating a break has begun.", + "User Story #23: When a session countdown reaches zero (NOTE: timer MUST reach 00:00), a new break countdown should begin, counting down from the value currently displayed in the id=\"break-length\" element.", + "User Story #24: When a break countdown reaches zero (NOTE: timer MUST reach 00:00), and a new countdown begins, the element with the id of timer-label should display a string indicating a session has begun.", + "User Story #25: When a break countdown reaches zero (NOTE: timer MUST reach 00:00), a new session countdown should begin, counting down from the value currently displayed in the id=\"session-length\" element.", + "User Story #26: When a countdown reaches zero (NOTE: timer MUST reach 00:00), a sound indicating that time is up should play. This should utilize an HTML5 audio tag and have a corresponding id=\"beep\".", + "User Story #27: The audio element with id=\"beep\" must be 1 second or longer.", + "User Story #28: The audio element with id of beep must stop playing and be rewound to the beginning when the element with the id of reset is clicked.", "You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js", "Once you're done, submit the URL to your working project with all its tests passing.", "Remember to use the Read-Search-Ask method if you get stuck." @@ -120,8 +194,5 @@ } } } - ], - "fileName": "03-front-end-libraries/front-end-libraries-projects.json", - "superBlock": "front-end-libraries", - "superOrder": 3 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/03-front-end-libraries/jquery.json b/packages/learn/seed/challenges/03-front-end-libraries/jquery.json index eca5d56a82..1edcb68087 100644 --- a/packages/learn/seed/challenges/03-front-end-libraries/jquery.json +++ b/packages/learn/seed/challenges/03-front-end-libraries/jquery.json @@ -76,13 +76,11 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", "contents": [ - "", - "", "", "", "
      ", @@ -107,8 +105,8 @@ "
      ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -181,7 +179,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -216,8 +214,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -289,7 +287,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -324,8 +322,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -397,7 +395,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -434,8 +432,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -499,7 +497,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -537,8 +535,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -622,7 +620,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -657,8 +655,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -722,7 +720,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -760,8 +758,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -833,7 +831,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -872,8 +870,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -940,7 +938,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -976,8 +974,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1044,7 +1042,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1080,8 +1078,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1124,7 +1122,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1161,8 +1159,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1215,7 +1213,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1253,8 +1251,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1310,7 +1308,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1349,8 +1347,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1410,7 +1408,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1452,8 +1450,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1509,7 +1507,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1550,8 +1548,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1616,7 +1614,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1658,8 +1656,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1716,7 +1714,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1760,8 +1758,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1808,7 +1806,7 @@ } }, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1853,13 +1851,10 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "03-front-end-libraries/jquery.json", - "superBlock": "front-end-libraries", - "superOrder": 3 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/03-front-end-libraries/react-and-redux.json b/packages/learn/seed/challenges/03-front-end-libraries/react-and-redux.json index d8b3a9b237..791a22a032 100644 --- a/packages/learn/seed/challenges/03-front-end-libraries/react-and-redux.json +++ b/packages/learn/seed/challenges/03-front-end-libraries/react-and-redux.json @@ -45,7 +45,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -109,7 +112,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -164,7 +170,9 @@ "contents": [ "// define ADD, addMessage(), messageReducer(), and store here:", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -298,7 +306,10 @@ " // change code above this line", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -348,7 +359,9 @@ "", "// change code below this line", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -403,7 +416,9 @@ "", "// change code below this line", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -499,7 +514,8 @@ " }", "};", "ReactDOM.render(, document.getElementById('root'))" - ] + ], + "head": [] } }, "tests": [ @@ -637,7 +653,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -782,7 +801,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -872,7 +894,9 @@ "", "// change code below this line", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -889,8 +913,5 @@ "translations": {}, "reactRedux": true } - ], - "fileName": "03-front-end-libraries/react-and-redux.json", - "superBlock": "front-end-libraries", - "superOrder": 3 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/03-front-end-libraries/react.json b/packages/learn/seed/challenges/03-front-end-libraries/react.json index 9fea116182..310c4cdd11 100644 --- a/packages/learn/seed/challenges/03-front-end-libraries/react.json +++ b/packages/learn/seed/challenges/03-front-end-libraries/react.json @@ -35,7 +35,10 @@ "const JSX =
      ;", "" ], - "tail": "ReactDOM.render(JSX, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(JSX, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -84,7 +87,10 @@ "// write your code here", "" ], - "tail": "ReactDOM.render(JSX, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(JSX, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -140,7 +146,10 @@ " ", ");" ], - "tail": "ReactDOM.render(JSX, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(JSX, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -194,7 +203,9 @@ ");", "// change code below this line", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -247,7 +258,10 @@ " ", ");" ], - "tail": "ReactDOM.render(JSX, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(JSX, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -298,7 +312,10 @@ ");", "" ], - "tail": "ReactDOM.render(JSX, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(JSX, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -351,7 +368,10 @@ " // change code above this line", "}" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -369,7 +389,7 @@ } ], "solutions": [ - "\nconst MyComponent = function() {\n // change code below this line\n return (\n
      \n Demo Solution\n
      \n );\n // change code above this line\n}" + "const MyComponent = function() {\n // change code below this line\n return (\n
      \n Demo Solution\n
      \n );\n // change code above this line\n}" ], "challengeType": 6, "isRequired": false, @@ -408,7 +428,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -426,7 +449,7 @@ } ], "solutions": [ - "\nclass MyComponent extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n // change code below this line\n return (\n
      \n

      Hello React!

      \n
      \n );\n // change code above this line\n }\n};" + "class MyComponent extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n // change code below this line\n return (\n
      \n

      Hello React!

      \n
      \n );\n // change code above this line\n }\n};" ], "challengeType": 6, "isRequired": false, @@ -477,7 +500,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -559,7 +585,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -596,7 +625,7 @@ "As the challenges continue to use more complex compositions with React components and JSX, there is one important point to note. Rendering ES6 style class components within other components is no different than rendering the simple components you used in the last few challenges. You can render JSX elements, stateless functional components, and ES6 class components within other components.", "
      ", "In the code editor, the TypesOfFood component is already rendering a component called Vegetables. Also, there is the Fruits component from the last challenge.", - "Nest two components inside of Fruits — first NonCitrus, and then Citrus. Both of these components are provided for you in the background. Next, nest the Fruits class component into the the TypesOfFood component, below the h1 header and above Vegetables. The result should be a series of nested components, which uses two different component types." + "Nest two components inside of Fruits — first NonCitrus, and then Citrus. Both of these components are provided for you in the background. Next, nest the Fruits class component into the TypesOfFood component, below the h1 header and above Vegetables. The result should be a series of nested components, which uses two different component types." ], "files": { "indexjsx": { @@ -683,7 +712,9 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ] } }, "tests": [ @@ -785,7 +816,8 @@ "", "// change code below this line", "" - ] + ], + "tail": [] } }, "tests": [ @@ -807,7 +839,7 @@ } ], "solutions": [ - "\nclass TypesOfFood extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n return (\n
      \n

      Types of Food:

      \n {/* change code below this line */}\n \n \n {/* change code above this line */}\n
      \n );\n }\n};\n\n// change code below this line\nReactDOM.render(, document.getElementById('challenge-node'));" + "class TypesOfFood extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n return (\n
      \n

      Types of Food:

      \n {/* change code below this line */}\n \n \n {/* change code above this line */}\n
      \n );\n }\n};\n\n// change code below this line\nReactDOM.render(, document.getElementById('challenge-node'));" ], "challengeType": 6, "isRequired": false, @@ -832,7 +864,9 @@ "contents": [ "// change code below this line", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -903,7 +937,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -929,7 +966,7 @@ } ], "solutions": [ - "\nconst CurrentDate = (props) => {\n return (\n
      \n { /* change code below this line */ }\n

      The current date is: {props.date}

      \n { /* change code above this line */ }\n
      \n );\n};\n\nclass Calendar extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n return (\n
      \n

      What date is it?

      \n { /* change code below this line */ }\n \n { /* change code above this line */ }\n
      \n );\n }\n};" + "const CurrentDate = (props) => {\n return (\n
      \n { /* change code below this line */ }\n

      The current date is: {props.date}

      \n { /* change code above this line */ }\n
      \n );\n};\n\nclass Calendar extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n return (\n
      \n

      What date is it?

      \n { /* change code below this line */ }\n \n { /* change code above this line */ }\n
      \n );\n }\n};" ], "challengeType": 6, "isRequired": false, @@ -982,7 +1019,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1048,7 +1088,10 @@ "// change code below this line", "" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1104,7 +1147,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1176,7 +1222,9 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ] } }, "tests": [ @@ -1252,7 +1300,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1322,7 +1373,9 @@ "// change code below this line", "" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ] } }, "tests": [ @@ -1389,7 +1442,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1402,8 +1458,8 @@ "testString": "assert((function() { const mockedComponent = Enzyme.mount(React.createElement(StatefulComponent)); return mockedComponent.find('div').length === 1 && mockedComponent.find('h1').length === 1; })(), 'StatefulComponent should render a div and an h1 element.');" }, { - "text": "The state of StatefulComponent should be initalized with a property name set to a string.", - "testString": "assert((function() { const mockedComponent = Enzyme.mount(React.createElement(StatefulComponent)); const initialState = mockedComponent.state(); return ( typeof initialState === 'object' && typeof initialState.name === 'string'); })(), 'The state of StatefulComponent should be initalized with a property name set to a string.');" + "text": "The state of StatefulComponent should be initialized with a property name set to a string.", + "testString": "assert((function() { const mockedComponent = Enzyme.mount(React.createElement(StatefulComponent)); const initialState = mockedComponent.state(); return ( typeof initialState === 'object' && typeof initialState.name === 'string'); })(), 'The state of StatefulComponent should be initialized with a property name set to a string.');" }, { "text": "The property name in the state of StatefulComponent should render in the h1 element.", @@ -1411,7 +1467,7 @@ } ], "solutions": [ - "\nclass StatefulComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n name: 'freeCodeCamp!'\n }\n }\n render() {\n return (\n
      \n

      {this.state.name}

      \n
      \n );\n }\n};" + "class StatefulComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n name: 'freeCodeCamp!'\n }\n }\n render() {\n return (\n
      \n

      {this.state.name}

      \n
      \n );\n }\n};" ], "challengeType": 6, "isRequired": false, @@ -1455,7 +1511,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1517,7 +1576,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1587,7 +1649,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1662,7 +1727,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1736,7 +1804,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1802,17 +1873,20 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ { - "text": "MyComponent should return a div element which contains three buttons with text content in this order Increment!, Decrement!, Reset.", - "testString": "assert((() => { const mockedComponent = Enzyme.mount(React.createElement(Counter)); return (mockedComponent.find('.inc').text() === 'Increment!' && mockedComponent.find('.dec').text() === 'Decrement!' && mockedComponent.find('.reset').text() === 'Reset'); })(), 'MyComponent should return a div element which contains three buttons with text content in this order Increment!, Decrement!, Reset.');" + "text": "Counter should return a div element which contains three buttons with text content in this order Increment!, Decrement!, Reset.", + "testString": "assert((() => { const mockedComponent = Enzyme.mount(React.createElement(Counter)); return (mockedComponent.find('.inc').text() === 'Increment!' && mockedComponent.find('.dec').text() === 'Decrement!' && mockedComponent.find('.reset').text() === 'Reset'); })(), 'Counter should return a div element which contains three buttons with text content in this order Increment!, Decrement!, Reset.');" }, { - "text": "The state of MyComponent should initialize with a count property set to 0.", - "testString": "assert.strictEqual(Enzyme.mount(React.createElement(Counter)).state('count'), 0, 'The state of MyComponent should initialize with a count property set to 0.');" + "text": "The state of Counter should initialize with a count property set to 0.", + "testString": "assert.strictEqual(Enzyme.mount(React.createElement(Counter)).state('count'), 0, 'The state of Counter should initialize with a count property set to 0.');" }, { "text": "Clicking the increment button should increment the count by 1.", @@ -1880,7 +1954,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -1912,7 +1989,7 @@ "description": [ "The last challenge showed that React can control the internal state for certain elements like input and textarea, which makes them controlled components. This applies to other form elements as well, including the regular HTML form element.", "
      ", - "The MyForm component is set up with an empty form with a submit handler. The submit handler will be called when the formed is submitted.", + "The MyForm component is set up with an empty form with a submit handler. The submit handler will be called when the form is submitted.", "We've added a button which submits the form. You can see it has the type set to submit indicating it is the button controlling the form. Add the input element in the form and set its value and onChange() attributes like the last challenge. You should then complete the handleSubmit method so that it sets the component state property submit to the current input value in the local state.", "Note:  You also must call event.preventDefault() in the submit handler, to prevent the default form submit behavior which will refresh the web page.", "Finally, create an h1 tag after the form which renders the submit value from the component's state. You can then type in the form and click the button (or press enter), and you should see your input rendered to the page." @@ -1960,7 +2037,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2039,7 +2119,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2134,7 +2217,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2204,7 +2290,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2264,7 +2353,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2342,7 +2434,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2427,7 +2522,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2516,7 +2614,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2550,12 +2651,13 @@ "title": "Introducing Inline Styles", "releasedOn": "December 25, 2017", "description": [ - "There are other complex concepts that add powerful capabilities to your React code. But you may be wondering about the more simple problem of how to style those JSX elements you create in React. You likely know that it won't be exactly the same as working with HTML because of the way you apply classes to JSX elements.", + "There are other complex concepts that add powerful capabilities to your React code. But you may be wondering about the more simple problem of how to style those JSX elements you create in React. You likely know that it won't be exactly the same as working with HTML because of the way you apply classes to JSX elements.", "If you import styles from a stylesheet, it isn't much different at all. You apply a class to your JSX element using the className attribute, and apply styles to the class in your stylesheet. Another option is to apply inline styles, which are very common in ReactJS development.", "You apply inline styles to JSX elements similar to how you do it in HTML, but with a few JSX differences. Here's an example of an inline style in HTML:", "<div style=\"color: yellow; font-size: 16px\">Mellow Yellow</div>", "JSX elements use the style attribute, but because of the way JSX is transpiled, you can't set the value to a string. Instead, you set it equal to a JavaScript object. Here's an example:", "<div style={{color: \"yellow\", fontSize: 16}}>Mellow Yellow</div>", + "Notice how we camelCase the \"fontSize\" property? This is because React will not accept kebab-case keys in the style object. React will apply the correct property name for us in the HTML.", "
      ", "Add a style attribute to the div in the code editor to give the text a color of red and font size of 72px.", "Note that you can optionally set the font size to be a number, omitting the units \"px\", or write it as \"72px\"." @@ -2576,7 +2678,10 @@ "};", "" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2594,7 +2699,7 @@ } ], "solutions": [ - "\nclass Colorful extends React.Component {\n render() {\n return (\n
      Big Red
      \n );\n }\n};\n" + "class Colorful extends React.Component {\n render() {\n return (\n
      Big Red
      \n );\n }\n};\n" ], "challengeType": 6, "isRequired": false, @@ -2631,7 +2736,10 @@ "};", "" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2661,7 +2769,7 @@ } ], "solutions": [ - "\nconst styles = {\n color: \"purple\",\n fontSize: 40,\n border: \"2px solid purple\"\n};\n// change code above this line\nclass Colorful extends React.Component {\n render() {\n // change code below this line\n return (\n
      Style Me!
      \n // change code above this line\n );\n }\n};\n" + "const styles = {\n color: \"purple\",\n fontSize: 40,\n border: \"2px solid purple\"\n};\n// change code above this line\nclass Colorful extends React.Component {\n render() {\n // change code below this line\n return (\n
      Style Me!
      \n // change code above this line\n );\n }\n};\n" ], "challengeType": 6, "isRequired": false, @@ -2760,7 +2868,8 @@ "tail": [ "var possibleAnswers = [ 'It is certain', 'It is decidedly so', 'Without a doubt', 'Yes, definitely', 'You may rely on it', 'As I see it, yes', 'Outlook good', 'Yes', 'Signs point to yes', 'Reply hazy try again', 'Ask again later', 'Better not tell you now', 'Cannot predict now', 'Concentrate and ask again', 'Don\\'t count on it', 'My reply is no', 'My sources say no', 'Outlook not so good','Very doubtful', 'Most likely' ];", "ReactDOM.render(, document.getElementById('root'))" - ] + ], + "head": [] } }, "tests": [ @@ -2790,7 +2899,7 @@ } ], "solutions": [ - "\nconst inputStyle = {\n width: 235,\n margin: 5\n}\n\nclass MagicEightBall extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n userInput: '',\n randomIndex: ''\n }\n this.ask = this.ask.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n ask() {\n if (this.state.userInput) {\n this.setState({\n randomIndex: Math.floor(Math.random() * 20),\n userInput: ''\n });\n }\n }\n handleChange(event) {\n this.setState({\n userInput: event.target.value\n });\n }\n render() {\n const possibleAnswers = [\n \"It is certain\", \"It is decidedly so\", \"Without a doubt\",\n \"Yes, definitely\", \"You may rely on it\", \"As I see it, yes\",\n \"Outlook good\", \"Yes\", \"Signs point to yes\", \"Reply hazy try again\",\n \"Ask again later\", \"Better not tell you now\", \"Cannot predict now\",\n \"Concentrate and ask again\", \"Don't count on it\", \"My reply is no\",\n \"My sources say no\", \"Outlook not so good\",\"Very doubtful\", \"Most likely\"\n ];\n const answer = possibleAnswers[this.state.randomIndex];\n return (\n
      \n
      \n
      \n

      Answer:

      \n

      \n {answer}\n

      \n
      \n );\n }\n};" + "const inputStyle = {\n width: 235,\n margin: 5\n}\n\nclass MagicEightBall extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n userInput: '',\n randomIndex: ''\n }\n this.ask = this.ask.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n ask() {\n if (this.state.userInput) {\n this.setState({\n randomIndex: Math.floor(Math.random() * 20),\n userInput: ''\n });\n }\n }\n handleChange(event) {\n this.setState({\n userInput: event.target.value\n });\n }\n render() {\n const possibleAnswers = [\n \"It is certain\", \"It is decidedly so\", \"Without a doubt\",\n \"Yes, definitely\", \"You may rely on it\", \"As I see it, yes\",\n \"Outlook good\", \"Yes\", \"Signs point to yes\", \"Reply hazy try again\",\n \"Ask again later\", \"Better not tell you now\", \"Cannot predict now\",\n \"Concentrate and ask again\", \"Don't count on it\", \"My reply is no\",\n \"My sources say no\", \"Outlook not so good\",\"Very doubtful\", \"Most likely\"\n ];\n const answer = possibleAnswers[this.state.randomIndex];\n return (\n
      \n
      \n
      \n

      Answer:

      \n

      \n {answer}\n

      \n
      \n );\n }\n};" ], "challengeType": 6, "isRequired": false, @@ -2838,7 +2947,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -2908,7 +3020,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -3000,7 +3115,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -3034,7 +3152,7 @@ } ], "solutions": [ - "\nconst inputStyle = {\n width: 235,\n margin: 5\n}\n\nclass CheckUserAge extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n userAge: '',\n input: ''\n }\n this.submit = this.submit.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n handleChange(e) {\n this.setState({\n input: e.target.value,\n userAge: ''\n });\n }\n submit() {\n this.setState({\n userAge: this.state.input\n });\n }\n render() {\n const buttonOne = ;\n const buttonTwo = ;\n const buttonThree = ;\n return (\n
      \n

      Enter Your Age to Continue

      \n
      \n {\n this.state.userAge === '' ?\n buttonOne :\n this.state.userAge >= 18 ?\n buttonTwo :\n buttonThree\n }\n
      \n );\n }\n};" + "const inputStyle = {\n width: 235,\n margin: 5\n}\n\nclass CheckUserAge extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n userAge: '',\n input: ''\n }\n this.submit = this.submit.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n handleChange(e) {\n this.setState({\n input: e.target.value,\n userAge: ''\n });\n }\n submit() {\n this.setState({\n userAge: this.state.input\n });\n }\n render() {\n const buttonOne = ;\n const buttonTwo = ;\n const buttonThree = ;\n return (\n
      \n

      Enter Your Age to Continue

      \n
      \n {\n this.state.userAge === '' ?\n buttonOne :\n this.state.userAge >= 18 ?\n buttonTwo :\n buttonThree\n }\n
      \n );\n }\n};" ], "challengeType": 6, "isRequired": false, @@ -3101,7 +3219,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -3190,7 +3311,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -3216,7 +3340,7 @@ } ], "solutions": [ - "\nclass GateKeeper extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n input: ''\n };\n this.handleChange = this.handleChange.bind(this);\n }\n handleChange(event) {\n this.setState({ input: event.target.value })\n }\n render() {\n let inputStyle = {\n border: '1px solid black'\n };\n if (this.state.input.length > 15) {\n inputStyle.border = '3px solid red';\n };\n return (\n
      \n

      Don't Type Too Much:

      \n \n
      \n );\n }\n};" + "class GateKeeper extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n input: ''\n };\n this.handleChange = this.handleChange.bind(this);\n }\n handleChange(event) {\n this.setState({ input: event.target.value })\n }\n render() {\n let inputStyle = {\n border: '1px solid black'\n };\n if (this.state.input.length > 15) {\n inputStyle.border = '3px solid red';\n };\n return (\n
      \n

      Don't Type Too Much:

      \n \n
      \n );\n }\n};" ], "challengeType": 6, "isRequired": false, @@ -3285,7 +3409,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -3315,7 +3442,7 @@ } ], "solutions": [ - "\nconst textAreaStyles = {\n width: 235,\n margin: 5\n};\n\nclass MyToDoList extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n toDoList: [],\n userInput: ''\n }\n this.handleSubmit = this.handleSubmit.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n handleSubmit() {\n const itemsArray = this.state.userInput.split(',');\n this.setState({\n toDoList: itemsArray\n });\n }\n handleChange(e) {\n this.setState({\n userInput: e.target.value\n });\n }\n render() {\n const items = this.state.toDoList.map( (item, i) => {\n return
    • {item}
    • \n });\n return (\n
      \n
      \n \n

      My \"To Do\" List:

      \n
        \n {items}\n
      \n
      \n );\n }\n};" + "const textAreaStyles = {\n width: 235,\n margin: 5\n};\n\nclass MyToDoList extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n toDoList: [],\n userInput: ''\n }\n this.handleSubmit = this.handleSubmit.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n handleSubmit() {\n const itemsArray = this.state.userInput.split(',');\n this.setState({\n toDoList: itemsArray\n });\n }\n handleChange(e) {\n this.setState({\n userInput: e.target.value\n });\n }\n render() {\n const items = this.state.toDoList.map( (item, i) => {\n return
    • {item}
    • \n });\n return (\n
      \n
      \n \n

      My \"To Do\" List:

      \n
        \n {items}\n
      \n
      \n );\n }\n};" ], "challengeType": 6, "isRequired": false, @@ -3360,7 +3487,10 @@ " );", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -3386,7 +3516,7 @@ } ], "solutions": [ - "\nconst frontEndFrameworks = [\n 'React',\n 'Angular',\n 'Ember',\n 'Knockout',\n 'Backbone',\n 'Vue'\n];\n\nfunction Frameworks() {\n const renderFrameworks = frontEndFrameworks.map((fw, i) => {\n return
    • {fw}
    • \n })\n return (\n
      \n

      Popular Front End JavaScript Frameworks

      \n
        \n {renderFrameworks}\n
      \n
      \n );\n};" + "const frontEndFrameworks = [\n 'React',\n 'Angular',\n 'Ember',\n 'Knockout',\n 'Backbone',\n 'Vue'\n];\n\nfunction Frameworks() {\n const renderFrameworks = frontEndFrameworks.map((fw, i) => {\n return
    • {fw}
    • \n })\n return (\n
      \n

      Popular Front End JavaScript Frameworks

      \n
        \n {renderFrameworks}\n
      \n
      \n );\n};" ], "challengeType": 6, "isRequired": false, @@ -3455,7 +3585,10 @@ " }", "};" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ], + "head": [] } }, "tests": [ @@ -3481,7 +3614,7 @@ } ], "solutions": [ - "\nclass MyComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n users: [\n {\n username: 'Jeff',\n online: true\n },\n {\n username: 'Alan',\n online: false\n },\n {\n username: 'Mary',\n online: true\n },\n {\n username: 'Jim',\n online: false\n },\n {\n username: 'Sara',\n online: true\n },\n {\n username: 'Laura',\n online: true\n }\n ]\n }\n }\n render() {\n const usersOnline = this.state.users.filter(user => {\n return user.online;\n });\n const renderOnlineUsers = usersOnline.map(user => {\n return (\n
    • {user.username}
    • \n );\n });\n return (\n
      \n

      Current Online Users:

      \n
        \n {renderOnlineUsers}\n
      \n
      \n );\n }\n};" + "class MyComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n users: [\n {\n username: 'Jeff',\n online: true\n },\n {\n username: 'Alan',\n online: false\n },\n {\n username: 'Mary',\n online: true\n },\n {\n username: 'Jim',\n online: false\n },\n {\n username: 'Sara',\n online: true\n },\n {\n username: 'Laura',\n online: true\n }\n ]\n }\n }\n render() {\n const usersOnline = this.state.users.filter(user => {\n return user.online;\n });\n const renderOnlineUsers = usersOnline.map(user => {\n return (\n
    • {user.username}
    • \n );\n });\n return (\n
      \n

      Current Online Users:

      \n
        \n {renderOnlineUsers}\n
      \n
      \n );\n }\n};" ], "challengeType": 6, "isRequired": false, @@ -3520,7 +3653,9 @@ "// change code below this line", "" ], - "tail": "ReactDOM.render(, document.getElementById('root'))" + "tail": [ + "ReactDOM.render(, document.getElementById('root'))" + ] } }, "tests": [ @@ -3530,15 +3665,12 @@ } ], "solutions": [ - "\nclass App extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n return
      \n }\n};\n\n// change code below this line\nReactDOMServer.renderToString();" + "class App extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n return
      \n }\n};\n\n// change code below this line\nReactDOMServer.renderToString();" ], "challengeType": 6, "isRequired": false, "translations": {}, "react": true } - ], - "fileName": "03-front-end-libraries/react.json", - "superBlock": "front-end-libraries", - "superOrder": 3 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/03-front-end-libraries/redux.json b/packages/learn/seed/challenges/03-front-end-libraries/redux.json index 26ea097721..faf1a4b4c0 100644 --- a/packages/learn/seed/challenges/03-front-end-libraries/redux.json +++ b/packages/learn/seed/challenges/03-front-end-libraries/redux.json @@ -40,7 +40,9 @@ "// Define the store here:", "", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -82,7 +84,9 @@ "", "// change code below this line", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -121,7 +125,9 @@ "contents": [ "// Define an action here:", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -162,7 +168,9 @@ "}", "// Define an action creator here:", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -216,7 +224,9 @@ "", "// Dispatch the action here:", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -274,7 +284,9 @@ " type: 'LOGIN'", " }", "};" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -342,7 +354,9 @@ " type: 'LOGOUT'", " }", "};" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -437,7 +451,9 @@ " type: 'LOGOUT'", " }", "};" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -526,7 +542,8 @@ "console.log(count);", "store.dispatch({type: ADD});", "console.log(count);" - ] + ], + "tail": [] } }, "tests": [ @@ -606,7 +623,9 @@ "", "const store = Redux.createStore(rootReducer);", "" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -675,7 +694,9 @@ "console.log(store.getState());", "store.dispatch(addNoteText('Hello!'));", "console.log(store.getState());" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -760,7 +781,9 @@ " asyncDataReducer,", " Redux.applyMiddleware(ReduxThunk.default)", ");" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -818,7 +841,9 @@ "const decAction = null; // define an action creator for decrementing", "", "const store = null; // define the Redux store here, passing in your reducers" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -901,7 +926,9 @@ "}", "", "const store = Redux.createStore(immutableReducer);" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -961,7 +988,9 @@ "}", "", "const store = Redux.createStore(immutableReducer);" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -1023,7 +1052,9 @@ "}", "", "const store = Redux.createStore(immutableReducer);" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -1089,7 +1120,9 @@ "};", "", "const store = Redux.createStore(immutableReducer);" - ] + ], + "head": [], + "tail": [] } }, "tests": [ @@ -1118,8 +1151,5 @@ "translations": {}, "redux": true } - ], - "fileName": "03-front-end-libraries/redux.json", - "superBlock": "front-end-libraries", - "superOrder": 3 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/03-front-end-libraries/sass.json b/packages/learn/seed/challenges/03-front-end-libraries/sass.json index 3d14c117da..7cdb6d7b72 100644 --- a/packages/learn/seed/challenges/03-front-end-libraries/sass.json +++ b/packages/learn/seed/challenges/03-front-end-libraries/sass.json @@ -47,7 +47,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -77,8 +77,8 @@ "

      Even more random text within a paragraph

      ", "
      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -113,7 +113,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -136,8 +136,8 @@ "

      This is a paragraph

      ", "
      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -196,7 +196,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -216,8 +216,8 @@ "
      ", " " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -232,9 +232,9 @@ ], "description": [ "The @if directive in Sass is useful to test for a specific case - it works just like the if statement in JavaScript.", - "
      @mixin make-bold($bool) {
        @if $bool == bold { font-weight: bold; }
      }
      ", + "
      @mixin make-bold($bool) {
        @if $bool == true {
          font-weight: bold;
        }
      }
      ", "And just like in JavaScript, @else if and @else test for more conditions:", - "
      @mixin text-effect($val) {
        @if $val == danger {color: red;}
        @else if $val == alert {color: yellow;}
        @else if $val == success {color: green;}
        @else {color: black;}
      }
      ", + "
      @mixin text-effect($val) {
        @if $val == danger {
          color: red;
        }
        @else if $val == alert {
          color: yellow;
        }
        @else if $val == success {
          color: green;
        }
        @else {
          color: black;
        }
      }
      ", "
      ", "Create a mixin called border-stroke that takes a parameter $val. The mixin should check for the following conditions using @if, @else if, and @else:", "
      light - 1px solid black
      medium - 3px solid black
      heavy - 6px solid black
      none - no border
      " @@ -268,7 +268,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -287,8 +287,8 @@ "", "
      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -346,7 +346,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -363,8 +363,8 @@ "

      Hello

      ", "

      Hello

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -397,15 +397,15 @@ }, { "text": "Your .blue-bg class should have a background-color of blue.", - "testString": "assert($('blue-bg').css('background-color') == 'rgb(0, 0, 255)', 'Your .blue-bg class should have a background-color of blue.');" + "testString": "assert($('.blue-bg').css('background-color') == 'rgb(0, 0, 255)', 'Your .blue-bg class should have a background-color of blue.');" }, { "text": "Your .black-bg class should have a background-color of black.", - "testString": "assert($('black-bg').css('background-color') == 'rgb(0, 0, 0)', 'Your .black-bg class should have a background-color of black.');" + "testString": "assert($('.black-bg').css('background-color') == 'rgb(0, 0, 0)', 'Your .black-bg class should have a background-color of black.');" }, { "text": "Your .red-bg class should have a background-color of red.", - "testString": "assert($('red-bg').css('background-color') == 'rgb(255, 0, 0)', 'Your .red-bg class should have a background-color of red.');" + "testString": "assert($('.red-bg').css('background-color') == 'rgb(255, 0, 0)', 'Your .red-bg class should have a background-color of red.');" } ], "solutions": [], @@ -415,7 +415,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -434,8 +434,8 @@ "
      ", "
      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -519,7 +519,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -541,8 +541,8 @@ "

      Hello

      ", "

      Hello

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -577,7 +577,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -588,8 +588,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -616,16 +616,12 @@ ], "tests": [ { - "text": "Your code should use the @extend directive to extend the info class.", - "testString": "assert(code.match(/@extend\\s+?\\.info/g), 'Your code should use the @extend directive to extend the info class.');" + "text": "Your info-important class should have a background-color set to magenta.", + "testString": "assert(code.match(/\\.info-important\\s*?{[\\s\\S]*background-color\\s*?:\\s*?magenta\\s*?;[\\s\\S]*}/gi), 'Your info-important class should have a background-color set to magenta.');" }, { - "text": "Your info-important class should have a background-color set to magenta.", - "testString": "assert($('.info-important').css('background-color') == 'rgb(255, 0, 255)', 'Your info-important class should have a background-color set to magenta.');" - }, - { - "text": "Your info-important class should inherit the styling from the info class.", - "testString": "assert($('.info-important').css('width') == '200px', 'Your info-important class should inherit the styling from the info class.');" + "text": "Your info-important class should use @extend to inherit the styling from the info class.", + "testString": "assert(code.match(/\\.info-important\\s*?{[\\s\\S]*@extend\\s*?.info\\s*?;[\\s\\S]*/gi), 'Your info-important class should use @extend to inherit the styling from the info class.');" } ], "solutions": [], @@ -635,7 +631,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -663,13 +659,10 @@ "

      This is a simple post. It has basic styling and can be extended for other uses.

      ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "03-front-end-libraries/sass.json", - "superBlock": "front-end-libraries", - "superOrder": 3 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/04-data-visualization/data-visualization-projects.json b/packages/learn/seed/challenges/04-data-visualization/data-visualization-projects.json index dbec477495..cb54c04391 100644 --- a/packages/learn/seed/challenges/04-data-visualization/data-visualization-projects.json +++ b/packages/learn/seed/challenges/04-data-visualization/data-visualization-projects.json @@ -183,8 +183,5 @@ "challengeType": 3, "translations": {} } - ], - "fileName": "04-data-visualization/data-visualization-projects.json", - "superBlock": "data-visualization", - "superOrder": 4 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/04-data-visualization/data-visualization-with-d3.json b/packages/learn/seed/challenges/04-data-visualization/data-visualization-with-d3.json index 7fa6e16421..96d2f7f31f 100644 --- a/packages/learn/seed/challenges/04-data-visualization/data-visualization-with-d3.json +++ b/packages/learn/seed/challenges/04-data-visualization/data-visualization-with-d3.json @@ -59,7 +59,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -74,8 +74,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -115,7 +115,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -135,8 +135,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -184,7 +184,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -201,8 +201,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -269,7 +269,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -290,8 +290,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -327,7 +327,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -349,8 +349,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -416,7 +416,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -438,8 +438,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -475,7 +475,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -504,8 +504,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -571,7 +571,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -601,8 +601,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -667,7 +667,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -699,8 +699,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -742,7 +742,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -768,8 +768,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -819,7 +819,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -843,8 +843,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -889,7 +889,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -919,8 +919,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -988,7 +988,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1022,8 +1022,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1087,7 +1087,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1121,8 +1121,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1189,7 +1189,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1223,8 +1223,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1255,7 +1255,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1288,8 +1288,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1354,7 +1354,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1393,8 +1393,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1428,7 +1428,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1470,8 +1470,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1502,7 +1502,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1550,8 +1550,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1618,7 +1618,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1667,8 +1667,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1699,7 +1699,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1738,8 +1738,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1814,7 +1814,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1856,8 +1856,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1929,7 +1929,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -1978,8 +1978,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2023,7 +2023,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2044,8 +2044,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2097,7 +2097,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2117,8 +2117,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2160,7 +2160,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2180,8 +2180,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2225,7 +2225,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2271,8 +2271,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2390,7 +2390,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2451,8 +2451,8 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2499,7 +2499,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -2567,13 +2567,10 @@ " ", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "04-data-visualization/data-visualization-with-d3.json", - "superBlock": "data-visualization", - "superOrder": 4 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/04-data-visualization/json-apis-and-ajax.json b/packages/learn/seed/challenges/04-data-visualization/json-apis-and-ajax.json index 1cc2219014..1990f31996 100644 --- a/packages/learn/seed/challenges/04-data-visualization/json-apis-and-ajax.json +++ b/packages/learn/seed/challenges/04-data-visualization/json-apis-and-ajax.json @@ -37,7 +37,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -86,8 +86,8 @@ " ", "

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -115,7 +115,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -166,8 +166,8 @@ " ", "

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -222,7 +222,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -273,8 +273,8 @@ " ", "

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -308,7 +308,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -366,8 +366,8 @@ " ", "

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -407,7 +407,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -467,8 +467,8 @@ " ", "

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -496,7 +496,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -559,8 +559,8 @@ " ", "

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -588,7 +588,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -654,8 +654,8 @@ " ", "

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -698,7 +698,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -714,8 +714,8 @@ "", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -766,7 +766,7 @@ "challengeType": 0, "translations": {}, "files": { - "indexjs": { + "indexhtml": { "key": "indexhtml", "ext": "html", "name": "index", @@ -822,13 +822,10 @@ " ", "

      " ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "04-data-visualization/json-apis-and-ajax.json", - "superBlock": "data-visualization", - "superOrder": 4 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/05-apis-and-microservices/api-and-microservice-projects.json b/packages/learn/seed/challenges/05-apis-and-microservices/apis-and-microservices-projects.json similarity index 93% rename from packages/learn/seed/challenges/05-apis-and-microservices/api-and-microservice-projects.json rename to packages/learn/seed/challenges/05-apis-and-microservices/apis-and-microservices-projects.json index a9aea909e3..19f5142e47 100644 --- a/packages/learn/seed/challenges/05-apis-and-microservices/api-and-microservice-projects.json +++ b/packages/learn/seed/challenges/05-apis-and-microservices/apis-and-microservices-projects.json @@ -1,5 +1,5 @@ { - "name": "API and Microservice Projects", + "name": "APIs and Microservices Projects", "order": 4, "time": "150 hours", "helpRoom": "HelpBackend", @@ -9,7 +9,7 @@ "title": "Timestamp Microservice", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://curse-arrow.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -43,7 +43,7 @@ "title": "Request Header Parser Microservice", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://dandelion-roar.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -69,7 +69,7 @@ "title": "URL Shortener Microservice", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://thread-paper.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -103,7 +103,7 @@ "title": "Exercise Tracker", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://fuschia-custard.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -145,7 +145,7 @@ "title": "File Metadata Microservice", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://purple-paladin.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -170,8 +170,5 @@ } } } - ], - "fileName": "05-apis-and-microservices/api-and-microservice-projects.json", - "superBlock": "apis-and-microservices", - "superOrder": 5 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/05-apis-and-microservices/basic-node-and-express.json b/packages/learn/seed/challenges/05-apis-and-microservices/basic-node-and-express.json index 6a96c813ff..7ef30356e8 100644 --- a/packages/learn/seed/challenges/05-apis-and-microservices/basic-node-and-express.json +++ b/packages/learn/seed/challenges/05-apis-and-microservices/basic-node-and-express.json @@ -260,7 +260,7 @@ "Mount a POST handler at the path /name. It’s the same path as before. We have prepared a form in the html frontpage. It will submit the same data of exercise 10 (Query string). If the body-parser is configured correctly, you should find the parameters in the object req.body. Have a look at the usual library example:", "
      route: POST '/library'
      urlencoded_body: userId=546&bookId=6754
      req.body: {userId: '546', bookId: '6754'}
      ", "Respond with the same JSON object as before: {name: 'firstname lastname'}. Test if your endpoint works using the html form we provided in the app frontpage.", - "Tip: There are several other http methods other than GET and POST. And by convention there is a corrispondence between the http verb, and the operation you are going to execute on the server. The conventional mapping is:", + "Tip: There are several other http methods other than GET and POST. And by convention there is a correspondence between the http verb, and the operation you are going to execute on the server. The conventional mapping is:", "POST (sometimes PUT) - Create a new resource using the information sent with the request,", "GET - Read an existing resource without modifying it,", "PUT or PATCH (sometimes POST) - Update a resource using the data sent,", @@ -283,8 +283,5 @@ "challengeType": 2, "translations": {} } - ], - "fileName": "05-apis-and-microservices/basic-node-and-express.json", - "superBlock": "apis-and-microservices", - "superOrder": 5 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/05-apis-and-microservices/managing-packages-with-npm.json b/packages/learn/seed/challenges/05-apis-and-microservices/managing-packages-with-npm.json index d83554ee95..329fa81d37 100644 --- a/packages/learn/seed/challenges/05-apis-and-microservices/managing-packages-with-npm.json +++ b/packages/learn/seed/challenges/05-apis-and-microservices/managing-packages-with-npm.json @@ -278,8 +278,5 @@ "challengeType": 2, "translations": {} } - ], - "fileName": "05-apis-and-microservices/managing-packages-with-npm.json", - "superBlock": "apis-and-microservices", - "superOrder": 5 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/05-apis-and-microservices/mongodb-and-mongoose.json b/packages/learn/seed/challenges/05-apis-and-microservices/mongodb-and-mongoose.json index 0c5389b3ae..99652bdf9d 100644 --- a/packages/learn/seed/challenges/05-apis-and-microservices/mongodb-and-mongoose.json +++ b/packages/learn/seed/challenges/05-apis-and-microservices/mongodb-and-mongoose.json @@ -19,6 +19,10 @@ { "text": "\"mongoose\" dependency should be in package.json", "testString": "getUserInput => $.get(getUserInput('url') + '/_api/file/package.json').then(data => { var packJson = JSON.parse(data); assert.property(packJson.dependencies, 'mongoose'); }, xhr => { throw new Error(xhr.responseText); })" + }, + { + "text": "\"mongoose\" should be connected to a database", + "testString": "getUserInput => $.get(getUserInput('url') + '/_api/is-mongoose-ok').then(data => {assert.isTrue(data.isMongooseOk, 'mongoose is not connected')}, xhr => { throw new Error(xhr.responseText); })" } ], "solutions": [], @@ -256,8 +260,5 @@ "challengeType": 2, "translations": {} } - ], - "fileName": "05-apis-and-microservices/mongodb-and-mongoose.json", - "superBlock": "apis-and-microservices", - "superOrder": 5 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/06-information-security-and-quality-assurance/advanced-express-tools.json b/packages/learn/seed/challenges/06-information-security-and-quality-assurance/advanced-express-tools.json index e9a733444e..e1a684d8f8 100644 --- a/packages/learn/seed/challenges/06-information-security-and-quality-assurance/advanced-express-tools.json +++ b/packages/learn/seed/challenges/06-information-security-and-quality-assurance/advanced-express-tools.json @@ -46,7 +46,7 @@ "Looking at our pug file 'index.pug' included in your project, we used the variables title and message", "To pass those alone from our server, you will need to add an object as a second argument to your res.render with the variables and their value. For example, pass this object along setting the variables for your index view: {title: 'Hello', message: 'Please login'", "It should look like: res.render(process.cwd() + '/views/pug/index', {title: 'Hello', message: 'Please login'});", - "Now refresh your page and you should see those values rendered in your view in the correct spot as layed out in your index.pug file! Submit your page when you think you've got it right." + "Now refresh your page and you should see those values rendered in your view in the correct spot as laid out in your index.pug file! Submit your page when you think you've got it right." ], "challengeSeed": [], "tests": [ @@ -471,13 +471,13 @@ }, { "id": "589fc830f9fc0f352b528e74", - "title": "Set up the Enviroment", + "title": "Set up the Environment", "description": [ "As a reminder, this project is being built upon the following starter project on Glitch, or cloned from GitHub.", - "Add Socket.IO as a dependency and require/instanciate it in your server defined as 'io' with the http server as an argument. const io = require('socket.io')(http);", + "Add Socket.IO as a dependency and require/instantiate it in your server defined as 'io' with the http server as an argument. const io = require('socket.io')(http);", "The first thing needing to be handled is listening for a new connection from the client. The on keyword does just that- listen for a specific event. It requires 2 arguments: a string containing the title of the event thats emitted, and a function with which the data is passed though. In the case of our connection listener, we use socket to define the data in the second argument. A socket is an individual client who is connected.", "For listening for connections on our server, add the following between the comments in your project:
      io.on('connection', socket => {\n  console.log('A user has connected');\n});
      ", - "Now for the client to connect, you just need to add the following to your client.js which is loaded by the page after you've authenticated:
      /*global io*/\nvar socket = io();
      The comment supresses the error you would normally see since 'io' is not defined in the file. We've already added a reliable CDN to the Socket.IO library on the page in chat.pug.", + "Now for the client to connect, you just need to add the following to your client.js which is loaded by the page after you've authenticated:
      /*global io*/\nvar socket = io();
      The comment suppresses the error you would normally see since 'io' is not defined in the file. We've already added a reliable CDN to the Socket.IO library on the page in chat.pug.", "Now try loading up your app and authenticate and you should see in your server console 'A user has connected'!", "Note
      io() works only when connecting to a socket hosted on the same url/server. For connecting to an external socket hosted elsewhere, you would use io.connect('URL');.", "Submit your page when you think you've got it right." @@ -490,7 +490,7 @@ }, { "text": "Socket.IO has been properly required and instanciated", - "testString": "getUserInput => $.get(getUserInput('url')+ '/_api/server.js').then(data => {assert.match(data, /io.*=.*require.*('|\")socket.io('|\").*http/gi, 'You should correctly require and instanciate socket.io as io.');}, xhr => { throw new Error(xhr.statusText); })" + "testString": "getUserInput => $.get(getUserInput('url')+ '/_api/server.js').then(data => {assert.match(data, /io.*=.*require.*('|\")socket.io('|\").*http/gi, 'You should correctly require and instantiate socket.io as io.');}, xhr => { throw new Error(xhr.statusText); })" }, { "text": "Socket.IO should be listening for connections", @@ -511,9 +511,9 @@ "title": "Communicate by Emitting", "description": [ "As a reminder, this project is being built upon the following starter project on Glitch, or cloned from GitHub.", - "Emit is the most common way of communicating you will use. When you emit something from the server to 'io', you send an event's name and data to all the connected sockets. A good example of this concept would be emiting the current count of connected users each time a new user connects!", + "Emit is the most common way of communicating you will use. When you emit something from the server to 'io', you send an event's name and data to all the connected sockets. A good example of this concept would be emitting the current count of connected users each time a new user connects!", "
      Start by adding a variable to keep track of the users just before where you are currently listening for connections. var currentUsers = 0;", - "Now when someone connects you should increment the count before emiting the count so you will want to add the incrementer within the connection listener. ++currentUsers;", + "Now when someone connects you should increment the count before emitting the count so you will want to add the incrementer within the connection listener. ++currentUsers;", "Finally after incrementing the count, you should emit the event(still within the connection listener). The event should be named 'user count' and the data should just be the 'currentUsers'. io.emit('user count', currentUsers);", "
      Now you can implement a way for your client to listen for this event! Similarly to listening for a connection on the server you will use the on keyword.
      socket.on('user count', function(data){\n  console.log(data);\n});
      ", "Now try loading up your app and authenticate and you should see in your client console '1' representing the current user count! Try loading more clients up and authenticating to see the number go up.", @@ -574,7 +574,7 @@ "Currently, you cannot determine who is connected to your web socket. While 'req.user' containers the user object, thats only when your user interacts with the web server and with web sockets you have no req (request) and therefor no user data. One way to solve the problem of knowing who is connected to your web socket is by parsing and decoding the cookie that contains the passport session then deserializing it to obtain the user object. Luckily, there is a package on NPM just for this that turns a once complex task into something simple!", "
      Add 'passport.socketio' as a dependency and require it as 'passportSocketIo'.", "Now we just have to tell Socket.IO to use it and set the options. Be sure this is added before the existing socket code and not in the existing connection listener. For your server it should look as follows:
      io.use(passportSocketIo.authorize({\n  cookieParser: cookieParser,\n  key:          'express.sid',\n  secret:       process.env.SESSION_SECRET,\n  store:        sessionStore\n}));
      You can also optionally pass 'success' and 'fail' with a function that will be called after the authentication process completes when a client trys to connect.", - "The user object is now accessable on your socket object as socket.request.user. For example, now you can add the following: console.log('user ' + socket.request.user.name + ' connected'); and it will log to the server console who has connected!", + "The user object is now accessible on your socket object as socket.request.user. For example, now you can add the following: console.log('user ' + socket.request.user.name + ' connected'); and it will log to the server console who has connected!", "Submit your page when you think you've got it right. If you're running into errors, you can check out the project up to this point here." ], "challengeSeed": [], @@ -585,7 +585,7 @@ }, { "text": "passportSocketIo is properly required", - "testString": "getUserInput => $.get(getUserInput('url')+ '/_api/server.js').then(data => {assert.match(data, /passportSockerIo.*=.*require.*('|\")passportSocketIo('|\")/gi, 'You should correctly require and instanciate socket.io as io.');}, xhr => { throw new Error(xhr.statusText); })" + "testString": "getUserInput => $.get(getUserInput('url')+ '/_api/server.js').then(data => {assert.match(data, /passportSockerIo.*=.*require.*('|\")passportSocketIo('|\")/gi, 'You should correctly require and instantiate socket.io as io.');}, xhr => { throw new Error(xhr.statusText); })" }, { "text": "passportSocketIo is properly setup", @@ -631,8 +631,8 @@ "As a reminder, this project is being built upon the following starter project on Glitch, or cloned from GitHub.", "It's time you start allowing clients to send a chat message to the server to emit to all the clients! Already in your client.js file you should see there is already a block of code handling when the messgae form is submitted! ($('form').submit(function(){ /*logic*/ });)", "
      Within the code you're handling the form submit you should emit an event after you define 'messageToSend' but before you clear the text box #m. The event should be named 'chat message' and the data should just be 'messageToSend'. socket.emit('chat message', messageToSend);", - "Now on your server you should be listening to the socket for the event 'chat message' with the data being named 'message'. Once the event is recieved it should then emit the event 'chat message' to all sockets io.emit with the data being an object containing 'name' and 'message'.", - "On your client now again, you should now listen for event 'chat message' and when recieved, append a list item to #messages with the name a colon and the message!", + "Now on your server you should be listening to the socket for the event 'chat message' with the data being named 'message'. Once the event is received it should then emit the event 'chat message' to all sockets io.emit with the data being an object containing 'name' and 'message'.", + "On your client now again, you should now listen for event 'chat message' and when received, append a list item to #messages with the name a colon and the message!", "At this point the chat should be fully functional and sending messages across all clients! Submit your page when you think you've got it right. If you're running into errors, you can check out the project up to this point here for the server and here for the client." ], "challengeSeed": [], @@ -651,8 +651,5 @@ "challengeType": 2, "translations": {} } - ], - "fileName": "06-information-security-and-quality-assurance/advanced-express-tools.json", - "superBlock": "information-security-and-quality-assurance", - "superOrder": 6 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/06-information-security-and-quality-assurance/helmetjs.json b/packages/learn/seed/challenges/06-information-security-and-quality-assurance/helmetjs.json index 9b1b855a1e..5a1da5e3fa 100644 --- a/packages/learn/seed/challenges/06-information-security-and-quality-assurance/helmetjs.json +++ b/packages/learn/seed/challenges/06-information-security-and-quality-assurance/helmetjs.json @@ -277,7 +277,7 @@ }, { "text": "BCrypt has been properly required", - "testString": "getUserInput => $.get(getUserInput('url')+ '/_api/server.js').then(data => {assert.match(data, /bcrypt.*=.*require.*('|\")bcrypt('|\")/gi, 'You should correctly require and instanciate socket.io as io.');}, xhr => { throw new Error(xhr.statusText); })" + "testString": "getUserInput => $.get(getUserInput('url')+ '/_api/server.js').then(data => {assert.match(data, /bcrypt.*=.*require.*('|\")bcrypt('|\")/gi, 'You should correctly require and instantiate socket.io as io.');}, xhr => { throw new Error(xhr.statusText); })" } ], "solutions": [], @@ -333,8 +333,5 @@ "releasedOn": "Feb 17, 2017", "translations": {} } - ], - "fileName": "06-information-security-and-quality-assurance/information-security-with-helmetjs.json", - "superBlock": "information-security-and-quality-assurance", - "superOrder": 6 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/06-information-security-and-quality-assurance/quality-assurance-and-information-security-projects.json b/packages/learn/seed/challenges/06-information-security-and-quality-assurance/quality-assurance-and-information-security-projects.json index d18d75bd76..85ce478aec 100644 --- a/packages/learn/seed/challenges/06-information-security-and-quality-assurance/quality-assurance-and-information-security-projects.json +++ b/packages/learn/seed/challenges/06-information-security-and-quality-assurance/quality-assurance-and-information-security-projects.json @@ -9,7 +9,7 @@ "title": "Metric-Imperial Converter", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://hard-twilight.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -79,7 +79,7 @@ "title": "Issue Tracker", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://protective-garage.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -129,7 +129,7 @@ "title": "Personal Library", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://spark-cathedral.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -187,7 +187,7 @@ "title": "Stock Price Checker", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://giant-chronometer.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -197,7 +197,7 @@ "testString": "" }, { - "text": "I can GET /api/stock-prices with form data containing a Nasdaq stock ticker and recieve back an object stockData.", + "text": "I can GET /api/stock-prices with form data containing a Nasdaq stock ticker and receive back an object stockData.", "testString": "" }, { @@ -233,7 +233,7 @@ "title": "Anonymous Message Board", "description": [ "Build a full stack JavaScript app that is functionally similar to this: https://horn-celery.glitch.me/.", - "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicaly visible for our testing.", + "Working on this project will involve you writing your code on Glitch on our starter project. After completing this project you can copy your public glitch url (to the homepage of your app) into this screen to test it! Optionally you may choose to write your project on another platform but it must be publicly visible for our testing.", "Start this project on Glitch using this link or clone this repository on GitHub! If you use Glitch, remember to save the link to your project somewhere safe!" ], "challengeSeed": [], @@ -294,8 +294,5 @@ "releasedOn": "January 15, 2017", "translations": {} } - ], - "fileName": "06-information-security-and-quality-assurance/quality-assurance-and-information-security-projects.json", - "superBlock": "information-security-and-quality-assurance", - "superOrder": 6 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/06-information-security-and-quality-assurance/testing-with-chai.json b/packages/learn/seed/challenges/06-information-security-and-quality-assurance/testing-with-chai.json index afc655f95c..dcdfad82cb 100644 --- a/packages/learn/seed/challenges/06-information-security-and-quality-assurance/testing-with-chai.json +++ b/packages/learn/seed/challenges/06-information-security-and-quality-assurance/testing-with-chai.json @@ -321,15 +321,15 @@ "tests": [ { "text": "All tests should pass", - "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=10').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })" + "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=9').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })" }, { "text": "Use approximately(actual, expected, range) - Chose the correct range", - "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=10').then(data => { assert.equal(data.assertions[0].method, 'isApproximately', 'weirdNumbers(0.5) is in the range (0.5, 1.5]. It\\'s within 1 +/- 0.5'); assert.equal(data.assertions[0].args[2], 0.5); }, xhr => { throw new Error(xhr.responseText); })" + "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=9').then(data => { assert.equal(data.assertions[0].method, 'approximately'); assert.equal(data.assertions[0].args[2], 0.5, 'weirdNumbers(0.5) is in the range (0.5, 1.5]. It\\'s within 1 +/- 0.5'); }, xhr => { throw new Error(xhr.responseText); })" }, { "text": "Use approximately(actual, expected, range) - Chose the correct range", - "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=10').then(data => { assert.equal(data.assertions[1].method, 'isApproximately'); assert.equal(data.assertions[1].args[2], 0.8, 'weirdNumbers(0.2) is in the range (0.2, 1.2] It\\'s within 1 +/- 0.8'); }, xhr => { throw new Error(xhr.responseText); })" + "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=9').then(data => { assert.equal(data.assertions[1].method, 'approximately'); assert.equal(data.assertions[1].args[2], 0.8, 'weirdNumbers(0.2) is in the range (0.2, 1.2]. It\\'s within 1 +/- 0.8'); }, xhr => { throw new Error(xhr.responseText); })" } ], "solutions": [], @@ -539,7 +539,7 @@ }, { "text": "Choose the right assertion - typeOf vs. notTypeOf", - "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=16').then(data => { assert.equal(data.assertions[1].method, 'notTypeOf', 'Plane.wings is a Number (not a String)'); }, xhr => { throw new Error(xhr.responseText); })" + "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=16').then(data => { assert.equal(data.assertions[2].method, 'notTypeOf', 'Plane.wings is a Number (not a String)'); }, xhr => { throw new Error(xhr.responseText); })" }, { "text": "Choose the right assertion - typeOf vs. notTypeOf", @@ -698,7 +698,7 @@ }, { "id": "587d824f367417b2b2512c5b", - "title": "Run Functional Tests on an API Response using Chai-HTTP IV - PUT method redux", + "title": "Run Functional Tests on an API Response using Chai-HTTP IV - PUT method", "description": [ "As a reminder, this project is being built upon the following starter project on Glitch, or cloned from GitHub.", "This exercise is similar to the preceding. Look at it for the details.", @@ -752,7 +752,7 @@ "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=4').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })" }, { - "text": "assert that the headless browser request succeded", + "text": "assert that the headless browser request succeeded", "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=4').then(data => { assert.equal(data.assertions[0].method, 'browser.success'); }, xhr => { throw new Error(xhr.responseText); })" }, { @@ -789,7 +789,7 @@ "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=5').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })" }, { - "text": " assert that the headless browser request succeded", + "text": " assert that the headless browser request succeeded", "testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=5').then(data => { assert.equal(data.assertions[0].method, 'browser.success'); }, xhr => { throw new Error(xhr.responseText); })" }, { @@ -811,8 +811,5 @@ "releasedOn": "Feb 17, 2017", "translations": {} } - ], - "fileName": "06-information-security-and-quality-assurance/quality-assurance-and-testing-with-chai.json", - "superBlock": "information-security-and-quality-assurance", - "superOrder": 6 -} \ No newline at end of file + ] +} diff --git a/packages/learn/seed/challenges/08-coding-interview-prep/algorithms.json b/packages/learn/seed/challenges/08-coding-interview-prep/algorithms.json index 0de87438f6..9195435044 100644 --- a/packages/learn/seed/challenges/08-coding-interview-prep/algorithms.json +++ b/packages/learn/seed/challenges/08-coding-interview-prep/algorithms.json @@ -6,7 +6,7 @@ "challenges": [ { "id": "a3f503de51cf954ede28891d", - "title": "Symmetric Difference", + "title": "Find the Symmetric Difference", "description": [ "Create a function that takes two or more arrays and returns an array of the symmetric difference ( or ) of the provided arrays.", "Given two sets (for example set A = {1, 2, 3} and set B = {2, 3, 4}), the mathematical term \"symmetric difference\" of two sets is the set of elements which are in either of the two sets, but not in both (A △ B = C = {1, 4}). For every additional symmetric difference you take (say on a set D = {2, 3}), you should get the set with elements which are in either of the two the sets but not both (C △ D = {1, 4} △ {2, 3} = {1, 2, 3, 4}). The resulting array must contain only unique values (no duplicates).", @@ -117,8 +117,8 @@ "", "sym([1, 2, 3], [5, 2, 1, 4]);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -214,8 +214,8 @@ "", "updateInventory(curInv, newInv);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -316,8 +316,8 @@ "", "permAlone('aab');" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -326,7 +326,7 @@ "title": "Pairwise", "description": [ "Given an array arr, find element pairs whose sum equal the second argument arg and return the sum of their indices.", - "You may use multiple pairs that have the same numeric elements but different indices. Each pair should use the lowest possible available indices. Once an element has been used it cannot be reused to pair with another element.", + "You may use multiple pairs that have the same numeric elements but different indices. Each pair should use the lowest possible available indices. Once an element has been used it cannot be reused to pair with another element. For instance, pairwise([1, 1, 2], 3) creates a pair [2, 1] using the 1 at indice 0 rather than the 1 at indice 1, because 0+2 < 1+2.", "For example pairwise([7, 9, 11, 13, 15], 20) returns 6. The pairs that sum to 20 are [7, 13] and [9, 11]. We can then write out the array with their indices and values.", "
      Index01234
      Value79111315
      ", "Below we'll take their corresponding indices and add them.", @@ -410,8 +410,8 @@ "", "pairwise([1,4,2,3,0,5], 7);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -423,7 +423,7 @@ "Here we will see bubble sort. The bubble sort method starts at the beginning of an unsorted array and 'bubbles up' unsorted values towards the end, iterating through the array until it is completely sorted. It does this by comparing adjacent items and swapping them if they are out of order. The method continues looping through the array until no swaps occur at which point the array is sorted.", "This method requires multiple iterations through the array and for average and worst cases has quadratic time complexity. While simple, it is usually impractical in most situations.", "Instructions: Write a function bubbleSort which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest.", - "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting alogrithm in action!" + "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting algorithm in action!" ], "tests": [ { @@ -464,8 +464,13 @@ "// test array:", "// [1, 4, 2, 8, 345, 123, 43, 32, 5643, 63, 123, 43, 2, 55, 1, 234, 92]" ], - "head": "", - "tail": "function isSorted(arr) {\n var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);\n return check(0);\n};" + "head": [], + "tail": [ + "function isSorted(arr) {", + " var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);", + " return check(0);", + "};" + ] } } }, @@ -474,8 +479,8 @@ "title": "Implement Selection Sort", "description": [ "Here we will implement selection sort. Selection sort works by selecting the minimum value in a list and swapping it with the first value in the list. It then starts at the second position, selects the smallest value in the remaining list, and swaps it with the second element. It continues iterating through the list and swapping elements until it reaches the end of the list. Now the list is sorted. Selection sort has quadratic time complexity in all cases.", - "Instructions: Write a function selectionSort which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest.", - "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting alogrithm in action!" + "Instructions: Write a function selectionSort which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest.", + "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting algorithm in action!" ], "tests": [ { @@ -516,8 +521,13 @@ "// test array:", "// [1, 4, 2, 8, 345, 123, 43, 32, 5643, 63, 123, 43, 2, 55, 1, 234, 92]" ], - "head": "", - "tail": "function isSorted(arr) {\n var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);\n return check(0);\n};" + "head": [], + "tail": [ + "function isSorted(arr) {", + " var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);", + " return check(0);", + "};" + ] } } }, @@ -527,7 +537,7 @@ "description": [ "The next sorting method we'll look at is insertion sort. This method works by building up a sorted array at the beginning of the list. It begins the sorted array with the first element. Then it inspects the next element and swaps it backwards into the sorted array until it is in sorted position. It continues iterating through the list and swapping new items backwards into the sorted portion until it reaches the end. This algorithm has quadratic time complexity in the average and worst cases.", "Instructions: Write a function insertionSort which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest.", - "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting alogrithm in action!" + "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting algorithm in action!" ], "tests": [ { @@ -568,8 +578,13 @@ "// test array:", "// [1, 4, 2, 8, 345, 123, 43, 32, 5643, 63, 123, 43, 2, 55, 1, 234, 92]" ], - "head": "", - "tail": "function isSorted(arr) {\n var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);\n return check(0);\n};" + "head": [], + "tail": [ + "function isSorted(arr) {", + " var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);", + " return check(0);", + "};" + ] } } }, @@ -580,7 +595,7 @@ "Here we will move on to an intermediate sorting algorithm: quick sort. Quick sort is an efficient, recursive divide-and-conquer approach to sorting an array. In this method, a pivot value is chosen in the original array. The array is then partitioned into two subarrays of values less than and greater than the pivot value. We then combine the result of recursively calling the quick sort algorithm on both sub-arrays. This continues until the base case of an empty or single-item array is reached, which we return. The unwinding of the recursive calls return us the sorted array.", "Quick sort is a very efficient sorting method, providing O(nlog(n)) performance on average. It is also relatively easy to implement. These attributes make it a popular and useful sorting method.", "Instructions: Write a function quickSort which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest. While the choice of the pivot value is important, any pivot will do for our purposes here. For simplicity, the first or last element could be used.", - "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting alogrithm in action!" + "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting algorithm in action!" ], "tests": [ { @@ -621,8 +636,13 @@ "// test array:", "// [1, 4, 2, 8, 345, 123, 43, 32, 5643, 63, 123, 43, 2, 55, 1, 234, 92]" ], - "head": "", - "tail": "function isSorted(arr) {\n var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);\n return check(0);\n};" + "head": [], + "tail": [ + "function isSorted(arr) {", + " var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);", + " return check(0);", + "};" + ] } } }, @@ -636,7 +656,7 @@ "Merge sort is an efficient sorting method, with time complexity of O(nlog(n)). This algorithm is popular because it is performant and relatively easy to implement.", "As an aside, this will be the last sorting algorithm we cover here. However, later in the section on tree data structures we will describe heap sort, another efficient sorting method that requires a binary heap in its implementation.", "Instructions: Write a function mergeSort which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest. A good way to implement this is to write one function, for instance merge, which is responsible for merging two sorted arrays, and another function, for instance mergeSort, which is responsible for the recursion that produces single-item arrays to feed into merge. Good luck!", - "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting alogrithm in action!" + "Note:
      We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging array to see your sorting algorithm in action!" ], "tests": [ { @@ -677,13 +697,15 @@ "// test array:", "// [1, 4, 2, 8, 345, 123, 43, 32, 5643, 63, 123, 43, 2, 55, 1, 234, 92]" ], - "head": "", - "tail": "function isSorted(arr) {\n var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);\n return check(0);\n};" + "head": [], + "tail": [ + "function isSorted(arr) {", + " var check = (i) => (i == arr.length - 1) ? true : (arr[i] > arr[i + 1]) ? false : check(i + 1);", + " return check(0);", + "};" + ] } } } - ], - "fileName": "08-coding-interview-questions-and-take-home-assignments/coding-interview-algorithm-questions.json", - "superBlock": "coding-interview-questions-and-take-home-assignments", - "superOrder": 8 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/08-coding-interview-prep/data-structures.json b/packages/learn/seed/challenges/08-coding-interview-prep/data-structures.json index c61a5221af..2253bebbd4 100644 --- a/packages/learn/seed/challenges/08-coding-interview-prep/data-structures.json +++ b/packages/learn/seed/challenges/08-coding-interview-prep/data-structures.json @@ -55,8 +55,8 @@ "var buffer;", "var i32View;" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -107,8 +107,8 @@ "// Only change code below this line", "" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -183,8 +183,8 @@ " // Only change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -258,8 +258,8 @@ " // Only change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -328,8 +328,8 @@ " // Only change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -419,8 +419,8 @@ " }", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -481,8 +481,8 @@ " // change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -542,8 +542,8 @@ " // change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -608,8 +608,8 @@ " // change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -680,8 +680,8 @@ " // change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -764,8 +764,8 @@ " // change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -859,8 +859,8 @@ " // change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -981,8 +981,8 @@ " // change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1034,8 +1034,8 @@ "", "checkSet();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1078,8 +1078,8 @@ " return set;", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1126,8 +1126,8 @@ "", "checkSet([ 1, 2, 3], 2); // Should return [ true, 3 ]" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1168,8 +1168,8 @@ " // change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1177,7 +1177,7 @@ "id": "8d5823c8c441eddfaeb5bdef", "title": "Create a Map Data Structure", "description": [ - "The next few challenges will cover maps and hash tables. Maps are data structurs that store key-value pairs. In JavaScript, these are available to us as objects. Maps provide rapid lookup of stored items based on key values and are very common and useful data structures.", + "The next few challenges will cover maps and hash tables. Maps are data structures that store key-value pairs. In JavaScript, these are available to us as objects. Maps provide rapid lookup of stored items based on key values and are very common and useful data structures.", "Instructions: Let's get some practice creating our own map. Because JavaScript objects provide a much more efficient map structure than anything we could write here, this is intended primarily as a learning exercise. However, JavaScript objects only provide us with certain operations. What if we wanted to define custom operations?", "Use the Map object provided here as a wrapper around a JavaScript object. Create the following methods and operations on the Map object:", "add accepts a key, value pair to add to the map", @@ -1199,7 +1199,7 @@ }, { "text": "The add method adds items to the map.", - "testString": "assert((function() { var test = false; if (typeof Map !== 'undefined') { test = new Map() }; test.add(5,6); test.add(2,3); test.add(2,5); return (test.size() == 3)})(), 'The add method adds items to the map.');" + "testString": "assert((function() { var test = false; if (typeof Map !== 'undefined') { test = new Map() }; test.add(5,6); test.add(2,3); test.add(2,5); return (test.size() == 2)})(), 'The add method adds items to the map.');" }, { "text": "The has method returns true for added items and false for absent items.", @@ -1235,8 +1235,8 @@ " // change code above this line", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1277,8 +1277,8 @@ "contents": [ "// change code below this line" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1350,8 +1350,16 @@ " // change code above this line", "};" ], - "head": " var called = 0;\n var hash = (string) => {\n called++;\n var hash = 0;\n for (var i = 0; i < string.length; i++) { hash += string.charCodeAt(i); };\n return hash;\n };", - "tail": "" + "head": [ + " var called = 0;", + " var hash = (string) => {", + " called++;", + " var hash = 0;", + " for (var i = 0; i < string.length; i++) { hash += string.charCodeAt(i); };", + " return hash;", + " };" + ], + "tail": [] } } }, @@ -1400,8 +1408,8 @@ "// test your code", "console.log(Kitten.next);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1472,8 +1480,8 @@ " };", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1563,8 +1571,8 @@ " };", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1668,8 +1676,8 @@ " // Only change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1776,8 +1784,8 @@ " // Only change code above this line", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1859,8 +1867,8 @@ "", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1931,8 +1939,39 @@ " // change code above this line", "};" ], - "head": "", - "tail": "DoublyLinkedList.prototype = {\n print() {\n if (this.head == null) {\n return null;\n } else {\n var result = new Array();\n var node = this.head;\n while (node.next != null) {\n result.push(node.data);\n node = node.next;\n };\n result.push(node.data);\n return result;\n };\n },\n printReverse() {\n if (this.tail == null) {\n return null;\n } else {\n var result = new Array();\n var node = this.tail;\n while (node.prev != null) {\n result.push(node.data);\n node = node.prev;\n };\n result.push(node.data);\n return result;\n };\n } \n};" + "head": [], + "tail": [ + "DoublyLinkedList.prototype = {", + " print() {", + " if (this.head == null) {", + " return null;", + " } else {", + " var result = new Array();", + " var node = this.head;", + " while (node.next != null) {", + " result.push(node.data);", + " node = node.next;", + " };", + " result.push(node.data);", + " return result;", + " };", + " },", + " printReverse() {", + " if (this.tail == null) {", + " return null;", + " } else {", + " var result = new Array();", + " var node = this.tail;", + " while (node.prev != null) {", + " result.push(node.data);", + " node = node.prev;", + " };", + " result.push(node.data);", + " return result;", + " };", + " } ", + "};" + ] } } }, @@ -1991,8 +2030,55 @@ " // change code above this line", "};" ], - "head": "", - "tail": "DoublyLinkedList.prototype = {\n add(data) {\n if (this.head == null) {\n this.head = new Node(data, null);\n this.tail = this.head;\n } else {\n var node = this.head;\n var prev = null;\n while (node.next != null) {\n prev = node;\n node = node.next;\n };\n var newNode = new Node(data, node);\n node.next = newNode;\n this.tail = newNode;\n };\n },\n print() {\n if (this.head == null) {\n return null;\n } else {\n var result = new Array();\n var node = this.head;\n while (node.next != null) {\n result.push(node.data);\n node = node.next;\n };\n result.push(node.data);\n return result;\n };\n },\n printReverse() {\n if (this.tail == null) {\n return null;\n } else {\n var result = new Array();\n var node = this.tail;\n while (node.prev != null) {\n result.push(node.data);\n node = node.prev;\n };\n result.push(node.data);\n return result;\n };\n }\n};" + "head": [], + "tail": [ + "DoublyLinkedList.prototype = {", + " add(data) {", + " if (this.head == null) {", + " this.head = new Node(data, null);", + " this.tail = this.head;", + " } else {", + " var node = this.head;", + " var prev = null;", + " while (node.next != null) {", + " prev = node;", + " node = node.next;", + " };", + " var newNode = new Node(data, node);", + " node.next = newNode;", + " this.tail = newNode;", + " };", + " },", + " print() {", + " if (this.head == null) {", + " return null;", + " } else {", + " var result = new Array();", + " var node = this.head;", + " while (node.next != null) {", + " result.push(node.data);", + " node = node.next;", + " };", + " result.push(node.data);", + " return result;", + " };", + " },", + " printReverse() {", + " if (this.tail == null) {", + " return null;", + " } else {", + " var result = new Array();", + " var node = this.tail;", + " while (node.prev != null) {", + " result.push(node.data);", + " node = node.prev;", + " };", + " result.push(node.data);", + " return result;", + " };", + " }", + "};" + ] } } }, @@ -2057,8 +2143,39 @@ " // change code above this line", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n add: function(value) {\n var node = this.root;\n if (node == null) {\n this.root = new Node(value);\n return;\n } else {\n function searchTree(node) {\n if (value < node.value) {\n if (node.left == null) {\n node.left = new Node(value);\n return;\n } else if (node.left != null) {\n return searchTree(node.left)\n };\n } else if (value > node.value) {\n if (node.right == null) {\n node.right = new Node(value);\n return;\n } else if (node.right != null) {\n return searchTree(node.right);\n };\n } else {\n return null;\n };\n };\n return searchTree(node);\n };\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " add: function(value) {", + " var node = this.root;", + " if (node == null) {", + " this.root = new Node(value);", + " return;", + " } else {", + " function searchTree(node) {", + " if (value < node.value) {", + " if (node.left == null) {", + " node.left = new Node(value);", + " return;", + " } else if (node.left != null) {", + " return searchTree(node.left)", + " };", + " } else if (value > node.value) {", + " if (node.right == null) {", + " node.right = new Node(value);", + " return;", + " } else if (node.right != null) {", + " return searchTree(node.right);", + " };", + " } else {", + " return null;", + " };", + " };", + " return searchTree(node);", + " };", + " }", + "};" + ] } } }, @@ -2111,8 +2228,38 @@ " // change code above this line", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n isBinarySearchTree() {\n if (this.root == null) {\n return null;\n } else {\n var check = true;\n function checkTree(node) {\n if (node.left != null) {\n var left = node.left;\n if (left.value > node.value) {\n check = false;\n } else {\n checkTree(left);\n }\n }\n if (node.right != null) {\n var right = node.right;\n if (right.value < node.value) {\n check = false;\n } else {\n checkTree(right);\n };\n };\n };\n checkTree(this.root);\n return check;\n };\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " isBinarySearchTree() {", + " if (this.root == null) {", + " return null;", + " } else {", + " var check = true;", + " function checkTree(node) {", + " if (node.left != null) {", + " var left = node.left;", + " if (left.value > node.value) {", + " check = false;", + " } else {", + " checkTree(left);", + " }", + " }", + " if (node.right != null) {", + " var right = node.right;", + " if (right.value < node.value) {", + " check = false;", + " } else {", + " checkTree(right);", + " };", + " };", + " };", + " checkTree(this.root);", + " return check;", + " };", + " }", + "};" + ] } } }, @@ -2165,8 +2312,39 @@ " // change code above this line", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n add: function(value) {\n var node = this.root;\n if (node == null) {\n this.root = new Node(value);\n return;\n } else {\n function searchTree(node) {\n if (value < node.value) {\n if (node.left == null) {\n node.left = new Node(value);\n return;\n } else if (node.left != null) {\n return searchTree(node.left)\n };\n } else if (value > node.value) {\n if (node.right == null) {\n node.right = new Node(value);\n return;\n } else if (node.right != null) {\n return searchTree(node.right);\n };\n } else {\n return null;\n };\n };\n return searchTree(node);\n };\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " add: function(value) {", + " var node = this.root;", + " if (node == null) {", + " this.root = new Node(value);", + " return;", + " } else {", + " function searchTree(node) {", + " if (value < node.value) {", + " if (node.left == null) {", + " node.left = new Node(value);", + " return;", + " } else if (node.left != null) {", + " return searchTree(node.left)", + " };", + " } else if (value > node.value) {", + " if (node.right == null) {", + " node.right = new Node(value);", + " return;", + " } else if (node.right != null) {", + " return searchTree(node.right);", + " };", + " } else {", + " return null;", + " };", + " };", + " return searchTree(node);", + " };", + " }", + "};" + ] } } }, @@ -2236,8 +2414,39 @@ " // change code above this line", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n add: function(value) {\n var node = this.root;\n if (node == null) {\n this.root = new Node(value);\n return;\n } else {\n function searchTree(node) {\n if (value < node.value) {\n if (node.left == null) {\n node.left = new Node(value);\n return;\n } else if (node.left != null) {\n return searchTree(node.left)\n };\n } else if (value > node.value) {\n if (node.right == null) {\n node.right = new Node(value);\n return;\n } else if (node.right != null) {\n return searchTree(node.right);\n };\n } else {\n return null;\n };\n };\n return searchTree(node);\n };\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " add: function(value) {", + " var node = this.root;", + " if (node == null) {", + " this.root = new Node(value);", + " return;", + " } else {", + " function searchTree(node) {", + " if (value < node.value) {", + " if (node.left == null) {", + " node.left = new Node(value);", + " return;", + " } else if (node.left != null) {", + " return searchTree(node.left)", + " };", + " } else if (value > node.value) {", + " if (node.right == null) {", + " node.right = new Node(value);", + " return;", + " } else if (node.right != null) {", + " return searchTree(node.right);", + " };", + " } else {", + " return null;", + " };", + " };", + " return searchTree(node);", + " };", + " }", + "};" + ] } } }, @@ -2318,8 +2527,39 @@ " // change code above this line", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n add: function(value) {\n var node = this.root;\n if (node == null) {\n this.root = new Node(value);\n return;\n } else {\n function searchTree(node) {\n if (value < node.value) {\n if (node.left == null) {\n node.left = new Node(value);\n return;\n } else if (node.left != null) {\n return searchTree(node.left)\n };\n } else if (value > node.value) {\n if (node.right == null) {\n node.right = new Node(value);\n return;\n } else if (node.right != null) {\n return searchTree(node.right);\n };\n } else {\n return null;\n };\n };\n return searchTree(node);\n };\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " add: function(value) {", + " var node = this.root;", + " if (node == null) {", + " this.root = new Node(value);", + " return;", + " } else {", + " function searchTree(node) {", + " if (value < node.value) {", + " if (node.left == null) {", + " node.left = new Node(value);", + " return;", + " } else if (node.left != null) {", + " return searchTree(node.left)", + " };", + " } else if (value > node.value) {", + " if (node.right == null) {", + " node.right = new Node(value);", + " return;", + " } else if (node.right != null) {", + " return searchTree(node.right);", + " };", + " } else {", + " return null;", + " };", + " };", + " return searchTree(node);", + " };", + " }", + "};" + ] } } }, @@ -2384,8 +2624,39 @@ " // change code above this line", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n add: function(value) {\n var node = this.root;\n if (node == null) {\n this.root = new Node(value);\n return;\n } else {\n function searchTree(node) {\n if (value < node.value) {\n if (node.left == null) {\n node.left = new Node(value);\n return;\n } else if (node.left != null) {\n return searchTree(node.left)\n };\n } else if (value > node.value) {\n if (node.right == null) {\n node.right = new Node(value);\n return;\n } else if (node.right != null) {\n return searchTree(node.right);\n };\n } else {\n return null;\n };\n };\n return searchTree(node);\n };\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " add: function(value) {", + " var node = this.root;", + " if (node == null) {", + " this.root = new Node(value);", + " return;", + " } else {", + " function searchTree(node) {", + " if (value < node.value) {", + " if (node.left == null) {", + " node.left = new Node(value);", + " return;", + " } else if (node.left != null) {", + " return searchTree(node.left)", + " };", + " } else if (value > node.value) {", + " if (node.right == null) {", + " node.right = new Node(value);", + " return;", + " } else if (node.right != null) {", + " return searchTree(node.right);", + " };", + " } else {", + " return null;", + " };", + " };", + " return searchTree(node);", + " };", + " }", + "};" + ] } } }, @@ -2446,8 +2717,84 @@ " // case 1: target has no children, change code below this line", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n add: function(value) {\n var node = this.root;\n if (node == null) {\n this.root = new Node(value);\n return;\n } else {\n function searchTree(node) {\n if (value < node.value) {\n if (node.left == null) {\n node.left = new Node(value);\n return;\n } else if (node.left != null) {\n return searchTree(node.left)\n };\n } else if (value > node.value) {\n if (node.right == null) {\n node.right = new Node(value);\n return;\n } else if (node.right != null) {\n return searchTree(node.right);\n };\n } else {\n return null;\n };\n };\n return searchTree(node);\n };\n },\n inorder: function() {\n if (this.root == null) {\n return null;\n } else {\n var result = new Array();\n function traverseInOrder(node) {\n if (node.left != null) {\n traverseInOrder(node.left);\n };\n result.push(node.value);\n if (node.right != null) {\n traverseInOrder(node.right);\n };\n }\n traverseInOrder(this.root);\n return result;\n };\n }, \n isBinarySearchTree() {\n if (this.root == null) {\n return null;\n } else {\n var check = true;\n function checkTree(node) {\n if (node.left != null) {\n var left = node.left;\n if (left.value > node.value) {\n check = false;\n } else {\n checkTree(left);\n }\n }\n if (node.right != null) {\n var right = node.right;\n if (right.value < node.value) {\n check = false;\n } else {\n checkTree(right);\n };\n };\n };\n checkTree(this.root);\n return check;\n }\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " add: function(value) {", + " var node = this.root;", + " if (node == null) {", + " this.root = new Node(value);", + " return;", + " } else {", + " function searchTree(node) {", + " if (value < node.value) {", + " if (node.left == null) {", + " node.left = new Node(value);", + " return;", + " } else if (node.left != null) {", + " return searchTree(node.left)", + " };", + " } else if (value > node.value) {", + " if (node.right == null) {", + " node.right = new Node(value);", + " return;", + " } else if (node.right != null) {", + " return searchTree(node.right);", + " };", + " } else {", + " return null;", + " };", + " };", + " return searchTree(node);", + " };", + " },", + " inorder: function() {", + " if (this.root == null) {", + " return null;", + " } else {", + " var result = new Array();", + " function traverseInOrder(node) {", + " if (node.left != null) {", + " traverseInOrder(node.left);", + " };", + " result.push(node.value);", + " if (node.right != null) {", + " traverseInOrder(node.right);", + " };", + " }", + " traverseInOrder(this.root);", + " return result;", + " };", + " }, ", + " isBinarySearchTree() {", + " if (this.root == null) {", + " return null;", + " } else {", + " var check = true;", + " function checkTree(node) {", + " if (node.left != null) {", + " var left = node.left;", + " if (left.value > node.value) {", + " check = false;", + " } else {", + " checkTree(left);", + " }", + " }", + " if (node.right != null) {", + " var right = node.right;", + " if (right.value < node.value) {", + " check = false;", + " } else {", + " checkTree(right);", + " };", + " };", + " };", + " checkTree(this.root);", + " return check;", + " }", + " }", + "};" + ] } } }, @@ -2552,8 +2899,84 @@ " };", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n add: function(value) {\n var node = this.root;\n if (node == null) {\n this.root = new Node(value);\n return;\n } else {\n function searchTree(node) {\n if (value < node.value) {\n if (node.left == null) {\n node.left = new Node(value);\n return;\n } else if (node.left != null) {\n return searchTree(node.left)\n };\n } else if (value > node.value) {\n if (node.right == null) {\n node.right = new Node(value);\n return;\n } else if (node.right != null) {\n return searchTree(node.right);\n };\n } else {\n return null;\n };\n };\n return searchTree(node);\n };\n },\n inorder: function() {\n if (this.root == null) {\n return null;\n } else {\n var result = new Array();\n function traverseInOrder(node) {\n if (node.left != null) {\n traverseInOrder(node.left);\n };\n result.push(node.value);\n if (node.right != null) {\n traverseInOrder(node.right);\n };\n }\n traverseInOrder(this.root);\n return result;\n };\n }, \n isBinarySearchTree() {\n if (this.root == null) {\n return null;\n } else {\n var check = true;\n function checkTree(node) {\n if (node.left != null) {\n var left = node.left;\n if (left.value > node.value) {\n check = false;\n } else {\n checkTree(left);\n }\n }\n if (node.right != null) {\n var right = node.right;\n if (right.value < node.value) {\n check = false;\n } else {\n checkTree(right);\n };\n };\n };\n checkTree(this.root);\n return check;\n }\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " add: function(value) {", + " var node = this.root;", + " if (node == null) {", + " this.root = new Node(value);", + " return;", + " } else {", + " function searchTree(node) {", + " if (value < node.value) {", + " if (node.left == null) {", + " node.left = new Node(value);", + " return;", + " } else if (node.left != null) {", + " return searchTree(node.left)", + " };", + " } else if (value > node.value) {", + " if (node.right == null) {", + " node.right = new Node(value);", + " return;", + " } else if (node.right != null) {", + " return searchTree(node.right);", + " };", + " } else {", + " return null;", + " };", + " };", + " return searchTree(node);", + " };", + " },", + " inorder: function() {", + " if (this.root == null) {", + " return null;", + " } else {", + " var result = new Array();", + " function traverseInOrder(node) {", + " if (node.left != null) {", + " traverseInOrder(node.left);", + " };", + " result.push(node.value);", + " if (node.right != null) {", + " traverseInOrder(node.right);", + " };", + " }", + " traverseInOrder(this.root);", + " return result;", + " };", + " }, ", + " isBinarySearchTree() {", + " if (this.root == null) {", + " return null;", + " } else {", + " var check = true;", + " function checkTree(node) {", + " if (node.left != null) {", + " var left = node.left;", + " if (left.value > node.value) {", + " check = false;", + " } else {", + " checkTree(left);", + " }", + " }", + " if (node.right != null) {", + " var right = node.right;", + " if (right.value < node.value) {", + " check = false;", + " } else {", + " checkTree(right);", + " };", + " };", + " };", + " checkTree(this.root);", + " return check;", + " }", + " }", + "};" + ] } } }, @@ -2681,8 +3104,84 @@ " };", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n add: function(value) {\n var node = this.root;\n if (node == null) {\n this.root = new Node(value);\n return;\n } else {\n function searchTree(node) {\n if (value < node.value) {\n if (node.left == null) {\n node.left = new Node(value);\n return;\n } else if (node.left != null) {\n return searchTree(node.left)\n };\n } else if (value > node.value) {\n if (node.right == null) {\n node.right = new Node(value);\n return;\n } else if (node.right != null) {\n return searchTree(node.right);\n };\n } else {\n return null;\n };\n };\n return searchTree(node);\n };\n },\n inorder: function() {\n if (this.root == null) {\n return null;\n } else {\n var result = new Array();\n function traverseInOrder(node) {\n if (node.left != null) {\n traverseInOrder(node.left);\n };\n result.push(node.value);\n if (node.right != null) {\n traverseInOrder(node.right);\n };\n }\n traverseInOrder(this.root);\n return result;\n };\n }, \n isBinarySearchTree() {\n if (this.root == null) {\n return null;\n } else {\n var check = true;\n function checkTree(node) {\n if (node.left != null) {\n var left = node.left;\n if (left.value > node.value) {\n check = false;\n } else {\n checkTree(left);\n }\n }\n if (node.right != null) {\n var right = node.right;\n if (right.value < node.value) {\n check = false;\n } else {\n checkTree(right);\n };\n };\n };\n checkTree(this.root);\n return check;\n }\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " add: function(value) {", + " var node = this.root;", + " if (node == null) {", + " this.root = new Node(value);", + " return;", + " } else {", + " function searchTree(node) {", + " if (value < node.value) {", + " if (node.left == null) {", + " node.left = new Node(value);", + " return;", + " } else if (node.left != null) {", + " return searchTree(node.left)", + " };", + " } else if (value > node.value) {", + " if (node.right == null) {", + " node.right = new Node(value);", + " return;", + " } else if (node.right != null) {", + " return searchTree(node.right);", + " };", + " } else {", + " return null;", + " };", + " };", + " return searchTree(node);", + " };", + " },", + " inorder: function() {", + " if (this.root == null) {", + " return null;", + " } else {", + " var result = new Array();", + " function traverseInOrder(node) {", + " if (node.left != null) {", + " traverseInOrder(node.left);", + " };", + " result.push(node.value);", + " if (node.right != null) {", + " traverseInOrder(node.right);", + " };", + " }", + " traverseInOrder(this.root);", + " return result;", + " };", + " }, ", + " isBinarySearchTree() {", + " if (this.root == null) {", + " return null;", + " } else {", + " var check = true;", + " function checkTree(node) {", + " if (node.left != null) {", + " var left = node.left;", + " if (left.value > node.value) {", + " check = false;", + " } else {", + " checkTree(left);", + " }", + " }", + " if (node.right != null) {", + " var right = node.right;", + " if (right.value < node.value) {", + " check = false;", + " } else {", + " checkTree(right);", + " };", + " };", + " };", + " checkTree(this.root);", + " return check;", + " }", + " }", + "};" + ] } } }, @@ -2733,8 +3232,57 @@ " // change code above this line", "}" ], - "head": "", - "tail": "BinarySearchTree.prototype = {\n add: function(value) {\n var node = this.root;\n if (node == null) {\n this.root = new Node(value);\n return;\n } else {\n function searchTree(node) {\n if (value < node.value) {\n if (node.left == null) {\n node.left = new Node(value);\n return;\n } else if (node.left != null) {\n return searchTree(node.left)\n };\n } else if (value > node.value) {\n if (node.right == null) {\n node.right = new Node(value);\n return;\n } else if (node.right != null) {\n return searchTree(node.right);\n };\n } else {\n return null;\n };\n };\n return searchTree(node);\n };\n },\n inorder: function() {\n if (this.root == null) {\n return null;\n } else {\n var result = new Array();\n function traverseInOrder(node) {\n if (node.left != null) {\n traverseInOrder(node.left);\n };\n result.push(node.value);\n if (node.right != null) {\n traverseInOrder(node.right);\n };\n }\n traverseInOrder(this.root);\n return result;\n };\n }\n};" + "head": [], + "tail": [ + "BinarySearchTree.prototype = {", + " add: function(value) {", + " var node = this.root;", + " if (node == null) {", + " this.root = new Node(value);", + " return;", + " } else {", + " function searchTree(node) {", + " if (value < node.value) {", + " if (node.left == null) {", + " node.left = new Node(value);", + " return;", + " } else if (node.left != null) {", + " return searchTree(node.left)", + " };", + " } else if (value > node.value) {", + " if (node.right == null) {", + " node.right = new Node(value);", + " return;", + " } else if (node.right != null) {", + " return searchTree(node.right);", + " };", + " } else {", + " return null;", + " };", + " };", + " return searchTree(node);", + " };", + " },", + " inorder: function() {", + " if (this.root == null) {", + " return null;", + " } else {", + " var result = new Array();", + " function traverseInOrder(node) {", + " if (node.left != null) {", + " traverseInOrder(node.left);", + " };", + " result.push(node.value);", + " if (node.right != null) {", + " traverseInOrder(node.right);", + " };", + " }", + " traverseInOrder(this.root);", + " return result;", + " };", + " }", + "};" + ] } } }, @@ -2797,8 +3345,8 @@ " // change code above this line", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2857,8 +3405,8 @@ " // change code above this line", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2910,8 +3458,8 @@ " // change code above this line", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2972,8 +3520,8 @@ " // change code above this line", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3026,8 +3574,8 @@ "var undirectedAdjList = {", "};" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3086,8 +3634,8 @@ "var adjMatUndirected = [", "];" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3150,8 +3698,8 @@ " ", "];" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3218,8 +3766,31 @@ "];", "console.log(bfs(exBFSGraph, 3));" ], - "head": "", - "tail": "// Source: http://adripofjavascript.com/blog/drips/object-equality-in-javascript.html\nfunction isEquivalent(a, b) {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n // If number of properties is different,\n // objects are not equivalent\n if (aProps.length != bProps.length) {\n return false;\n }\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n // If values of same property are not equal,\n // objects are not equivalent\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n // If we made it this far, objects\n // are considered equivalent\n return true;\n}" + "head": [], + "tail": [ + "// Source: http://adripofjavascript.com/blog/drips/object-equality-in-javascript.html", + "function isEquivalent(a, b) {", + " // Create arrays of property names", + " var aProps = Object.getOwnPropertyNames(a);", + " var bProps = Object.getOwnPropertyNames(b);", + " // If number of properties is different,", + " // objects are not equivalent", + " if (aProps.length != bProps.length) {", + " return false;", + " }", + " for (var i = 0; i < aProps.length; i++) {", + " var propName = aProps[i];", + " // If values of same property are not equal,", + " // objects are not equivalent", + " if (a[propName] !== b[propName]) {", + " return false;", + " }", + " }", + " // If we made it this far, objects", + " // are considered equivalent", + " return true;", + "}" + ] } } }, @@ -3296,13 +3867,10 @@ "];", "console.log(dfs(exDFSGraph, 3));" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "08-coding-interview-questions-and-take-home-assignments/coding-interview-data-structure-questions.json", - "superBlock": "coding-interview-questions-and-take-home-assignments", - "superOrder": 8 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/08-coding-interview-prep/project-euler-guide.md b/packages/learn/seed/challenges/08-coding-interview-prep/project-euler-guide.md new file mode 100644 index 0000000000..c1e6d67065 --- /dev/null +++ b/packages/learn/seed/challenges/08-coding-interview-prep/project-euler-guide.md @@ -0,0 +1,249 @@ +# A guide to improve Project Euler's problems + +Thank you for contributing to freeCodeCamp, your help is definitely needed here! + +freeCodeCamp is having a great breakthrough ahead, one of it is to prepare +campers for interview questions, and Project Euler is one of them. + +And to let campers having fun with this challenges during Christmas, we are +going to have a lot of help here to improve the challenges of Project Euler +problems (so people won't cheating by returning the value right away, since +Project Euler's problems only assert one answer.) + +**Table of Contents** + +* [What is Project Euler](#what-is-project-euler) +* [How to improve the problems](#how-to-improve-the-problems) + +## What is Project Euler + +[Project Euler](https://projecteuler.net/) is a series of challenging +mathematical/computer programming problems that will require more than just +mathematical insights to solve. Although mathematics will help you arrive at +elegant and efficient methods, the use of a computer and programming skills will +be required to solve most problems. + +The motivation for starting Project Euler, and its continuation, is to provide a +platform for the inquiring mind to delve into unfamiliar areas and learn new +concepts in a fun and recreational context. + +## How to improve the problems + +The Project Euler problems seed can be found at +`seed/challenges/08-coding-interview-questions-and-take-home-assignments/project-euler-problems.json` + +Here's what it will look like (this is before the improvements, take problem 23 +as the example) + +```javascript +{ + "_id": "5900f3831000cf542c50fe96", + "challengeType": 5, + "type": "bonfire", + "title": "Problem 23: Non-abundant sums", + "tests": [ + "assert.strictEqual(euler23(), 4179871, 'message: euler23() should return 4179871.');" + ], + "solutions": [], + "translations": {}, + "challengeSeed": [ + "function euler23() {", + " // Good luck!", + " return true;", + "}", + "", + "euler23();" + ], + "description": [ + "A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number.", + "A number n is called deficient if the sum of its proper divisors is less than n and it is called abundant if this sum exceeds n.", + "", + "As 12 is the smallest abundant number, 1 + 2 + 3 + 4 + 6 = 16, the smallest number that can be written as the sum of two abundant numbers is 24. By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers. However, this upper limit cannot be reduced any further by analysis even though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit.", + "Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers." + ] +}, +``` + +and here's after some improvements + +```javascript +{ + "_id": "5900f3831000cf542c50fe96", + "challengeType": 5, + "type": "bonfire", + "title": "Problem 23: Non-abundant sums", + "tests": [ + "assert(sumOfNonAbundantNumbers(10000) === 3731004, 'message: sumOfNonAbundantNumbers(10000) should return 3731004.');", + "assert(sumOfNonAbundantNumbers(15000) === 4039939, 'message: sumOfNonAbundantNumbers(15000) should return 4039939.');", + "assert(sumOfNonAbundantNumbers(20000) === 4159710, 'message: sumOfNonAbundantNumbers(20000) should return 4159710.');", + "assert(sumOfNonAbundantNumbers(28123) === 4179871, 'message: sumOfNonAbundantNumbers(28123) should return 4179871.');" + ], + "solutions": [], + "translations": {}, + "challengeSeed": [ + "function sumOfNonAbundantNumbers(n) {", + " // Good luck!", + " return n;", + "}", + "", + "sumOfNonAbundantNumbers(28123);" + ], + "description": [ + "A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number.", + "A number n is called deficient if the sum of its proper divisors is less than n and it is called abundant if this sum exceeds n.", + "", + "As 12 is the smallest abundant number, 1 + 2 + 3 + 4 + 6 = 16, the smallest number that can be written as the sum of two abundant numbers is 24. By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers. However, this upper limit cannot be reduced any further by analysis even though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit.", + "Find the sum of all positive integers <= n which cannot be written as the sum of two abundant numbers." + ] +}, +``` + +Don't be confused now, here's what to do to improve the problems: + +(We expect you already have forked freeCodeCamp's repository) + +### Step 1: Create new branch at your git origin (e.g: `feature/problem_euler23`) + +Always create the branch with the base refer to the newest freeCodeCamp's +staging branch, here's how to do that: + +1. Do fetch staging branch from freeCodeCamp's repository `$ git fetch upstream + staging` +2. Checkout to the staging branch `$ git checkout upstream/staging` +3. Create branch from upstream/staging `$ git checkout -b ` + +### Step 2: Change the name of the function to more readable + +For example, from `euler23()` into `sumOfNonAbundantNumbers()` We took the name +from the problem name :D + +### Step 3: Solve the problem by yourself + +Try to solve the problem by yourself but if you get stucked, + +Here's what to do: you can go to [mathblog](http://www.mathblog.dk/) or +[dreamshire](https://blog.dreamshire.com) to find other people's solution +written in other languages (usually C and C#) Learn from their solution and port +it to JavaScript :) ( Always have the perspective of learning, don't just copy +paste other people's code ) + +So from the example here's my solution (We didn't include it in the JSON because +up till now, we couldn't find a way to fit it in, when we transformed it into +array of strings it spits out error when running `$ npm run test-challenges` it +will be awesome if you can find how to fits that right in) + +```javascript +function sumOfNonAbundantNumbers() { + const getFactors = number => { + let factors = []; + + let possibleFactor = 1; + let sqrt = Math.sqrt(number); + + while (possibleFactor <= sqrt) { + if (number % possibleFactor == 0) { + factors[factors.length] = possibleFactor; + + let otherPossibleFactor = number / possibleFactor; + if (otherPossibleFactor > possibleFactor) + factors[factors.length] = otherPossibleFactor; + } + possibleFactor++; + } + + return factors; + }; + + const getAbundantNumbers = upperLimit => { + let abundantNumbers = []; + for (let i = 12; i <= upperLimit; i++) { + let factors = getFactors(i); + let factorSum = 0; + for (let factor, j = 0; (factor = factors[j]); j++) + if (i != factor) factorSum += factor; + + if (factorSum > i) { + abundantNumbers.push(i); + } + } + return abundantNumbers; + }; + + var abundantNumbers = getAbundantNumbers(28123); + + var sum = 0; + + for (var testNum = 1; testNum <= 28123; testNum++) { + var sumOfAbundant = false; + for ( + var i = 0, j = abundantNumbers.length - 1, abundantNumber1; + (abundantNumber1 = abundantNumbers[i]); + i++ + ) { + if (abundantNumber1 > testNum) { + break; + } + + var abundantNumber2 = abundantNumbers[j]; + while (j > 0 && abundantNumber1 + abundantNumber2 > testNum) { + abundantNumber2 = abundantNumbers[--j]; + } + + if (abundantNumber1 + abundantNumber2 == testNum) { + sumOfAbundant = true; + break; + } + } + if (!sumOfAbundant) { + sum += testNum; + } + } + + return sum; +} +``` + +After finished solving the problem, you can improve the task a little bit, for +example compared to asking campers to find the sum of all the positive integers, +you can ask campers to find the sum of all positive integers <= n. + +(if you add more assertions to the problem, always assert less than the original +problem, to prevent infinite loop, etc) + +One last thing, always make sure that the return value of the function is always +the same data type to which you want the function to return + +Like in the example above, we want the user to return integer, so we changed the +return value from true into integer. + +### Step 4: Running Test on Arcade Mode + +After done with the solution, run the test on +[ FCC's Arcade Mode ](https://github.com/freeCodeCamp/arcade-mode) + +### Step 5: Commit changes and push to your origin + +1. Do changes and add changed files to stage `$ git add .` +2. Commit those changes using `$ npm run commit` and follow the instruction + there. +3. And run `$ git push origin ` + +### Step 5: Create Pull Request to freeCodeCamp's staging branch + +Create PR to freeCodeCamp's staging branch and wait for your code to be assesed +from the maintainer. + +That's all it! if there's something unclear and you still have questions, you +can chat from gitter in +[Arcade-Mode](https://gitter.im/FreeCodeCamp/arcade-mode) +[Contributors](https://gitter.im/FreeCodeCamp/Contributors) or you can text me +right away @alvinkl + +# Why do we have to improve Project Euler problems? + +Our goal is to prevent user from cheating and just returning the project euler +result rightaway, and by giving more assertions and improving a bit of the task +we are able to make the challenge more challenging as well. + +With your help, we can help people to practice their skills and be confident to +face technical interviews like this :) diff --git a/packages/learn/seed/challenges/08-coding-interview-prep/project-euler.json b/packages/learn/seed/challenges/08-coding-interview-prep/project-euler.json index 03d9484e8a..71e0968cb6 100644 --- a/packages/learn/seed/challenges/08-coding-interview-prep/project-euler.json +++ b/packages/learn/seed/challenges/08-coding-interview-prep/project-euler.json @@ -48,8 +48,8 @@ "", "multiplesOf3and5(1000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -102,8 +102,8 @@ "", "fiboEvenSum(10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -159,8 +159,8 @@ "", "largestPrimeFactor(13195);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -200,8 +200,8 @@ "", "largestPalindromeProduct(3);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -245,8 +245,8 @@ "", "smallestMult(20);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -294,8 +294,8 @@ "", "sumSquareDifference(100);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -347,8 +347,8 @@ "", "nthPrime(10001);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -410,8 +410,8 @@ "", "largestProductinaSeries(13);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -458,8 +458,8 @@ "", "specialPythagoreanTriplet(1000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -507,8 +507,8 @@ "", "primeSummation(2000000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -602,8 +602,8 @@ "", "largestGridProduct(testGrid);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -657,8 +657,8 @@ "", "divisibleTriangleNumber(500);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -805,8 +805,116 @@ "", "largeSum(testNums);" ], - "head": "const fiftyDigitNums = [\n '37107287533902102798797998220837590246510135740250',\n '46376937677490009712648124896970078050417018260538',\n '74324986199524741059474233309513058123726617309629',\n '91942213363574161572522430563301811072406154908250',\n '23067588207539346171171980310421047513778063246676',\n '89261670696623633820136378418383684178734361726757',\n '28112879812849979408065481931592621691275889832738',\n '44274228917432520321923589422876796487670272189318',\n '47451445736001306439091167216856844588711603153276',\n '70386486105843025439939619828917593665686757934951',\n '62176457141856560629502157223196586755079324193331',\n '64906352462741904929101432445813822663347944758178',\n '92575867718337217661963751590579239728245598838407',\n '58203565325359399008402633568948830189458628227828',\n '80181199384826282014278194139940567587151170094390',\n '35398664372827112653829987240784473053190104293586',\n '86515506006295864861532075273371959191420517255829',\n '71693888707715466499115593487603532921714970056938',\n '54370070576826684624621495650076471787294438377604',\n '53282654108756828443191190634694037855217779295145',\n '36123272525000296071075082563815656710885258350721',\n '45876576172410976447339110607218265236877223636045',\n '17423706905851860660448207621209813287860733969412',\n '81142660418086830619328460811191061556940512689692',\n '51934325451728388641918047049293215058642563049483',\n '62467221648435076201727918039944693004732956340691',\n '15732444386908125794514089057706229429197107928209',\n '55037687525678773091862540744969844508330393682126',\n '18336384825330154686196124348767681297534375946515',\n '80386287592878490201521685554828717201219257766954',\n '78182833757993103614740356856449095527097864797581',\n '16726320100436897842553539920931837441497806860984',\n '48403098129077791799088218795327364475675590848030',\n '87086987551392711854517078544161852424320693150332',\n '59959406895756536782107074926966537676326235447210',\n '69793950679652694742597709739166693763042633987085',\n '41052684708299085211399427365734116182760315001271',\n '65378607361501080857009149939512557028198746004375',\n '35829035317434717326932123578154982629742552737307',\n '94953759765105305946966067683156574377167401875275',\n '88902802571733229619176668713819931811048770190271',\n '25267680276078003013678680992525463401061632866526',\n '36270218540497705585629946580636237993140746255962',\n '24074486908231174977792365466257246923322810917141',\n '91430288197103288597806669760892938638285025333403',\n '34413065578016127815921815005561868836468420090470',\n '23053081172816430487623791969842487255036638784583',\n '11487696932154902810424020138335124462181441773470',\n '63783299490636259666498587618221225225512486764533',\n '67720186971698544312419572409913959008952310058822',\n '95548255300263520781532296796249481641953868218774',\n '76085327132285723110424803456124867697064507995236',\n '37774242535411291684276865538926205024910326572967',\n '23701913275725675285653248258265463092207058596522',\n '29798860272258331913126375147341994889534765745501',\n '18495701454879288984856827726077713721403798879715',\n '38298203783031473527721580348144513491373226651381',\n '34829543829199918180278916522431027392251122869539',\n '40957953066405232632538044100059654939159879593635',\n '29746152185502371307642255121183693803580388584903',\n '41698116222072977186158236678424689157993532961922',\n '62467957194401269043877107275048102390895523597457',\n '23189706772547915061505504953922979530901129967519',\n '86188088225875314529584099251203829009407770775672',\n '11306739708304724483816533873502340845647058077308',\n '82959174767140363198008187129011875491310547126581',\n '97623331044818386269515456334926366572897563400500',\n '42846280183517070527831839425882145521227251250327',\n '55121603546981200581762165212827652751691296897789',\n '32238195734329339946437501907836945765883352399886',\n '75506164965184775180738168837861091527357929701337',\n '62177842752192623401942399639168044983993173312731',\n '32924185707147349566916674687634660915035914677504',\n '99518671430235219628894890102423325116913619626622',\n '73267460800591547471830798392868535206946944540724',\n '76841822524674417161514036427982273348055556214818',\n '97142617910342598647204516893989422179826088076852',\n '87783646182799346313767754307809363333018982642090',\n '10848802521674670883215120185883543223812876952786',\n '71329612474782464538636993009049310363619763878039',\n '62184073572399794223406235393808339651327408011116',\n '66627891981488087797941876876144230030984490851411',\n '60661826293682836764744779239180335110989069790714',\n '85786944089552990653640447425576083659976645795096',\n '66024396409905389607120198219976047599490197230297',\n '64913982680032973156037120041377903785566085089252',\n '16730939319872750275468906903707539413042652315011',\n '94809377245048795150954100921645863754710598436791',\n '78639167021187492431995700641917969777599028300699',\n '15368713711936614952811305876380278410754449733078',\n '40789923115535562561142322423255033685442488917353',\n '44889911501440648020369068063960672322193204149535',\n '41503128880339536053299340368006977710650566631954',\n '81234880673210146739058568557934581403627822703280',\n '82616570773948327592232845941706525094512325230608',\n '22918802058777319719839450180888072429661980811197',\n '77158542502016545090413245809786882778948721859617',\n '72107838435069186155435662884062257473692284509516',\n '20849603980134001723930671666823555245252804609722',\n '53503534226472524250874054075591789781264330331690'\n];\n\nconst testNums = [\n '37107287533902102798797998220837590246510135740250',\n '46376937677490009712648124896970078050417018260538'\n];", - "tail": "" + "head": [ + "const fiftyDigitNums = [", + " '37107287533902102798797998220837590246510135740250',", + " '46376937677490009712648124896970078050417018260538',", + " '74324986199524741059474233309513058123726617309629',", + " '91942213363574161572522430563301811072406154908250',", + " '23067588207539346171171980310421047513778063246676',", + " '89261670696623633820136378418383684178734361726757',", + " '28112879812849979408065481931592621691275889832738',", + " '44274228917432520321923589422876796487670272189318',", + " '47451445736001306439091167216856844588711603153276',", + " '70386486105843025439939619828917593665686757934951',", + " '62176457141856560629502157223196586755079324193331',", + " '64906352462741904929101432445813822663347944758178',", + " '92575867718337217661963751590579239728245598838407',", + " '58203565325359399008402633568948830189458628227828',", + " '80181199384826282014278194139940567587151170094390',", + " '35398664372827112653829987240784473053190104293586',", + " '86515506006295864861532075273371959191420517255829',", + " '71693888707715466499115593487603532921714970056938',", + " '54370070576826684624621495650076471787294438377604',", + " '53282654108756828443191190634694037855217779295145',", + " '36123272525000296071075082563815656710885258350721',", + " '45876576172410976447339110607218265236877223636045',", + " '17423706905851860660448207621209813287860733969412',", + " '81142660418086830619328460811191061556940512689692',", + " '51934325451728388641918047049293215058642563049483',", + " '62467221648435076201727918039944693004732956340691',", + " '15732444386908125794514089057706229429197107928209',", + " '55037687525678773091862540744969844508330393682126',", + " '18336384825330154686196124348767681297534375946515',", + " '80386287592878490201521685554828717201219257766954',", + " '78182833757993103614740356856449095527097864797581',", + " '16726320100436897842553539920931837441497806860984',", + " '48403098129077791799088218795327364475675590848030',", + " '87086987551392711854517078544161852424320693150332',", + " '59959406895756536782107074926966537676326235447210',", + " '69793950679652694742597709739166693763042633987085',", + " '41052684708299085211399427365734116182760315001271',", + " '65378607361501080857009149939512557028198746004375',", + " '35829035317434717326932123578154982629742552737307',", + " '94953759765105305946966067683156574377167401875275',", + " '88902802571733229619176668713819931811048770190271',", + " '25267680276078003013678680992525463401061632866526',", + " '36270218540497705585629946580636237993140746255962',", + " '24074486908231174977792365466257246923322810917141',", + " '91430288197103288597806669760892938638285025333403',", + " '34413065578016127815921815005561868836468420090470',", + " '23053081172816430487623791969842487255036638784583',", + " '11487696932154902810424020138335124462181441773470',", + " '63783299490636259666498587618221225225512486764533',", + " '67720186971698544312419572409913959008952310058822',", + " '95548255300263520781532296796249481641953868218774',", + " '76085327132285723110424803456124867697064507995236',", + " '37774242535411291684276865538926205024910326572967',", + " '23701913275725675285653248258265463092207058596522',", + " '29798860272258331913126375147341994889534765745501',", + " '18495701454879288984856827726077713721403798879715',", + " '38298203783031473527721580348144513491373226651381',", + " '34829543829199918180278916522431027392251122869539',", + " '40957953066405232632538044100059654939159879593635',", + " '29746152185502371307642255121183693803580388584903',", + " '41698116222072977186158236678424689157993532961922',", + " '62467957194401269043877107275048102390895523597457',", + " '23189706772547915061505504953922979530901129967519',", + " '86188088225875314529584099251203829009407770775672',", + " '11306739708304724483816533873502340845647058077308',", + " '82959174767140363198008187129011875491310547126581',", + " '97623331044818386269515456334926366572897563400500',", + " '42846280183517070527831839425882145521227251250327',", + " '55121603546981200581762165212827652751691296897789',", + " '32238195734329339946437501907836945765883352399886',", + " '75506164965184775180738168837861091527357929701337',", + " '62177842752192623401942399639168044983993173312731',", + " '32924185707147349566916674687634660915035914677504',", + " '99518671430235219628894890102423325116913619626622',", + " '73267460800591547471830798392868535206946944540724',", + " '76841822524674417161514036427982273348055556214818',", + " '97142617910342598647204516893989422179826088076852',", + " '87783646182799346313767754307809363333018982642090',", + " '10848802521674670883215120185883543223812876952786',", + " '71329612474782464538636993009049310363619763878039',", + " '62184073572399794223406235393808339651327408011116',", + " '66627891981488087797941876876144230030984490851411',", + " '60661826293682836764744779239180335110989069790714',", + " '85786944089552990653640447425576083659976645795096',", + " '66024396409905389607120198219976047599490197230297',", + " '64913982680032973156037120041377903785566085089252',", + " '16730939319872750275468906903707539413042652315011',", + " '94809377245048795150954100921645863754710598436791',", + " '78639167021187492431995700641917969777599028300699',", + " '15368713711936614952811305876380278410754449733078',", + " '40789923115535562561142322423255033685442488917353',", + " '44889911501440648020369068063960672322193204149535',", + " '41503128880339536053299340368006977710650566631954',", + " '81234880673210146739058568557934581403627822703280',", + " '82616570773948327592232845941706525094512325230608',", + " '22918802058777319719839450180888072429661980811197',", + " '77158542502016545090413245809786882778948721859617',", + " '72107838435069186155435662884062257473692284509516',", + " '20849603980134001723930671666823555245252804609722',", + " '53503534226472524250874054075591789781264330331690'", + "];", + "", + "const testNums = [", + " '37107287533902102798797998220837590246510135740250',", + " '46376937677490009712648124896970078050417018260538'", + "];" + ], + "tail": [] } } }, @@ -855,8 +963,8 @@ "", "longestCollatzSequence(14);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -903,8 +1011,8 @@ "", "latticePaths(4);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -948,8 +1056,8 @@ "", "powerDigitSum(15);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -994,8 +1102,8 @@ "", "numberLetterCounts(5);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1044,8 +1152,10 @@ "", "maximumPathSumI(testTriangle);" ], - "head": "const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];", - "tail": "" + "head": [ + "const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];" + ], + "tail": [] } } }, @@ -1097,8 +1207,8 @@ "", "countingSundays(1943, 1946);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1149,8 +1259,8 @@ "", "sumFactorialDigits(100);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1198,8 +1308,8 @@ "", "sumAmicableNum(10000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1246,8 +1356,10 @@ "", "namesScores(test1);" ], - "head": "const names = ['MARY','PATRICIA','LINDA','BARBARA','ELIZABETH','JENNIFER','MARIA','SUSAN','MARGARET','DOROTHY','LISA','NANCY','KAREN','BETTY','HELEN','SANDRA','DONNA','CAROL','RUTH','SHARON','MICHELLE','LAURA','SARAH','KIMBERLY','DEBORAH','JESSICA','SHIRLEY','CYNTHIA','ANGELA','MELISSA','BRENDA','AMY','ANNA','REBECCA','VIRGINIA','KATHLEEN','PAMELA','MARTHA','DEBRA','AMANDA','STEPHANIE','CAROLYN','CHRISTINE','MARIE','JANET','CATHERINE','FRANCES','ANN','JOYCE','DIANE','ALICE','JULIE','HEATHER','TERESA','DORIS','GLORIA','EVELYN','JEAN','CHERYL','MILDRED','KATHERINE','JOAN','ASHLEY','JUDITH','ROSE','JANICE','KELLY','NICOLE','JUDY','CHRISTINA','KATHY','THERESA','BEVERLY','DENISE','TAMMY','IRENE','JANE','LORI','RACHEL','MARILYN','ANDREA','KATHRYN','LOUISE','SARA','ANNE','JACQUELINE','WANDA','BONNIE','JULIA','RUBY','LOIS','TINA','PHYLLIS','NORMA','PAULA','DIANA','ANNIE','LILLIAN','EMILY','ROBIN','PEGGY','CRYSTAL','GLADYS','RITA','DAWN','CONNIE','FLORENCE','TRACY','EDNA','TIFFANY','CARMEN','ROSA','CINDY','GRACE','WENDY','VICTORIA','EDITH','KIM','SHERRY','SYLVIA','JOSEPHINE','THELMA','SHANNON','SHEILA','ETHEL','ELLEN','ELAINE','MARJORIE','CARRIE','CHARLOTTE','MONICA','ESTHER','PAULINE','EMMA','JUANITA','ANITA','RHONDA','HAZEL','AMBER','EVA','DEBBIE','APRIL','LESLIE','CLARA','LUCILLE','JAMIE','JOANNE','ELEANOR','VALERIE','DANIELLE','MEGAN','ALICIA','SUZANNE','MICHELE','GAIL','BERTHA','DARLENE','VERONICA','JILL','ERIN','GERALDINE','LAUREN','CATHY','JOANN','LORRAINE','LYNN','SALLY','REGINA','ERICA','BEATRICE','DOLORES','BERNICE','AUDREY','YVONNE','ANNETTE','JUNE','SAMANTHA','MARION','DANA','STACY','ANA','RENEE','IDA','VIVIAN','ROBERTA','HOLLY','BRITTANY','MELANIE','LORETTA','YOLANDA','JEANETTE','LAURIE','KATIE','KRISTEN','VANESSA','ALMA','SUE','ELSIE','BETH','JEANNE','VICKI','CARLA','TARA','ROSEMARY','EILEEN','TERRI','GERTRUDE','LUCY','TONYA','ELLA','STACEY','WILMA','GINA','KRISTIN','JESSIE','NATALIE','AGNES','VERA','WILLIE','CHARLENE','BESSIE','DELORES','MELINDA','PEARL','ARLENE','MAUREEN','COLLEEN','ALLISON','TAMARA','JOY','GEORGIA','CONSTANCE','LILLIE','CLAUDIA','JACKIE','MARCIA','TANYA','NELLIE','MINNIE','MARLENE','HEIDI','GLENDA','LYDIA','VIOLA','COURTNEY','MARIAN','STELLA','CAROLINE','DORA','JO','VICKIE','MATTIE','TERRY','MAXINE','IRMA','MABEL','MARSHA','MYRTLE','LENA','CHRISTY','DEANNA','PATSY','HILDA','GWENDOLYN','JENNIE','NORA','MARGIE','NINA','CASSANDRA','LEAH','PENNY','KAY','PRISCILLA','NAOMI','CAROLE','BRANDY','OLGA','BILLIE','DIANNE','TRACEY','LEONA','JENNY','FELICIA','SONIA','MIRIAM','VELMA','BECKY','BOBBIE','VIOLET','KRISTINA','TONI','MISTY','MAE','SHELLY','DAISY','RAMONA','SHERRI','ERIKA','KATRINA','CLAIRE','LINDSEY','LINDSAY','GENEVA','GUADALUPE','BELINDA','MARGARITA','SHERYL','CORA','FAYE','ADA','NATASHA','SABRINA','ISABEL','MARGUERITE','HATTIE','HARRIET','MOLLY','CECILIA','KRISTI','BRANDI','BLANCHE','SANDY','ROSIE','JOANNA','IRIS','EUNICE','ANGIE','INEZ','LYNDA','MADELINE','AMELIA','ALBERTA','GENEVIEVE','MONIQUE','JODI','JANIE','MAGGIE','KAYLA','SONYA','JAN','LEE','KRISTINE','CANDACE','FANNIE','MARYANN','OPAL','ALISON','YVETTE','MELODY','LUZ','SUSIE','OLIVIA','FLORA','SHELLEY','KRISTY','MAMIE','LULA','LOLA','VERNA','BEULAH','ANTOINETTE','CANDICE','JUANA','JEANNETTE','PAM','KELLI','HANNAH','WHITNEY','BRIDGET','KARLA','CELIA','LATOYA','PATTY','SHELIA','GAYLE','DELLA','VICKY','LYNNE','SHERI','MARIANNE','KARA','JACQUELYN','ERMA','BLANCA','MYRA','LETICIA','PAT','KRISTA','ROXANNE','ANGELICA','JOHNNIE','ROBYN','FRANCIS','ADRIENNE','ROSALIE','ALEXANDRA','BROOKE','BETHANY','SADIE','BERNADETTE','TRACI','JODY','KENDRA','JASMINE','NICHOLE','RACHAEL','CHELSEA','MABLE','ERNESTINE','MURIEL','MARCELLA','ELENA','KRYSTAL','ANGELINA','NADINE','KARI','ESTELLE','DIANNA','PAULETTE','LORA','MONA','DOREEN','ROSEMARIE','ANGEL','DESIREE','ANTONIA','HOPE','GINGER','JANIS','BETSY','CHRISTIE','FREDA','MERCEDES','MEREDITH','LYNETTE','TERI','CRISTINA','EULA','LEIGH','MEGHAN','SOPHIA','ELOISE','ROCHELLE','GRETCHEN','CECELIA','RAQUEL','HENRIETTA','ALYSSA','JANA','KELLEY','GWEN','KERRY','JENNA','TRICIA','LAVERNE','OLIVE','ALEXIS','TASHA','SILVIA','ELVIRA','CASEY','DELIA','SOPHIE','KATE','PATTI','LORENA','KELLIE','SONJA','LILA','LANA','DARLA','MAY','MINDY','ESSIE','MANDY','LORENE','ELSA','JOSEFINA','JEANNIE','MIRANDA','DIXIE','LUCIA','MARTA','FAITH','LELA','JOHANNA','SHARI','CAMILLE','TAMI','SHAWNA','ELISA','EBONY','MELBA','ORA','NETTIE','TABITHA','OLLIE','JAIME','WINIFRED','KRISTIE','MARINA','ALISHA','AIMEE','RENA','MYRNA','MARLA','TAMMIE','LATASHA','BONITA','PATRICE','RONDA','SHERRIE','ADDIE','FRANCINE','DELORIS','STACIE','ADRIANA','CHERI','SHELBY','ABIGAIL','CELESTE','JEWEL','CARA','ADELE','REBEKAH','LUCINDA','DORTHY','CHRIS','EFFIE','TRINA','REBA','SHAWN','SALLIE','AURORA','LENORA','ETTA','LOTTIE','KERRI','TRISHA','NIKKI','ESTELLA','FRANCISCA','JOSIE','TRACIE','MARISSA','KARIN','BRITTNEY','JANELLE','LOURDES','LAUREL','HELENE','FERN','ELVA','CORINNE','KELSEY','INA','BETTIE','ELISABETH','AIDA','CAITLIN','INGRID','IVA','EUGENIA','CHRISTA','GOLDIE','CASSIE','MAUDE','JENIFER','THERESE','FRANKIE','DENA','LORNA','JANETTE','LATONYA','CANDY','MORGAN','CONSUELO','TAMIKA','ROSETTA','DEBORA','CHERIE','POLLY','DINA','JEWELL','FAY','JILLIAN','DOROTHEA','NELL','TRUDY','ESPERANZA','PATRICA','KIMBERLEY','SHANNA','HELENA','CAROLINA','CLEO','STEFANIE','ROSARIO','OLA','JANINE','MOLLIE','LUPE','ALISA','LOU','MARIBEL','SUSANNE','BETTE','SUSANA','ELISE','CECILE','ISABELLE','LESLEY','JOCELYN','PAIGE','JONI','RACHELLE','LEOLA','DAPHNE','ALTA','ESTER','PETRA','GRACIELA','IMOGENE','JOLENE','KEISHA','LACEY','GLENNA','GABRIELA','KERI','URSULA','LIZZIE','KIRSTEN','SHANA','ADELINE','MAYRA','JAYNE','JACLYN','GRACIE','SONDRA','CARMELA','MARISA','ROSALIND','CHARITY','TONIA','BEATRIZ','MARISOL','CLARICE','JEANINE','SHEENA','ANGELINE','FRIEDA','LILY','ROBBIE','SHAUNA','MILLIE','CLAUDETTE','CATHLEEN','ANGELIA','GABRIELLE','AUTUMN','KATHARINE','SUMMER','JODIE','STACI','LEA','CHRISTI','JIMMIE','JUSTINE','ELMA','LUELLA','MARGRET','DOMINIQUE','SOCORRO','RENE','MARTINA','MARGO','MAVIS','CALLIE','BOBBI','MARITZA','LUCILE','LEANNE','JEANNINE','DEANA','AILEEN','LORIE','LADONNA','WILLA','MANUELA','GALE','SELMA','DOLLY','SYBIL','ABBY','LARA','DALE','IVY','DEE','WINNIE','MARCY','LUISA','JERI','MAGDALENA','OFELIA','MEAGAN','AUDRA','MATILDA','LEILA','CORNELIA','BIANCA','SIMONE','BETTYE','RANDI','VIRGIE','LATISHA','BARBRA','GEORGINA','ELIZA','LEANN','BRIDGETTE','RHODA','HALEY','ADELA','NOLA','BERNADINE','FLOSSIE','ILA','GRETA','RUTHIE','NELDA','MINERVA','LILLY','TERRIE','LETHA','HILARY','ESTELA','VALARIE','BRIANNA','ROSALYN','EARLINE','CATALINA','AVA','MIA','CLARISSA','LIDIA','CORRINE','ALEXANDRIA','CONCEPCION','TIA','SHARRON','RAE','DONA','ERICKA','JAMI','ELNORA','CHANDRA','LENORE','NEVA','MARYLOU','MELISA','TABATHA','SERENA','AVIS','ALLIE','SOFIA','JEANIE','ODESSA','NANNIE','HARRIETT','LORAINE','PENELOPE','MILAGROS','EMILIA','BENITA','ALLYSON','ASHLEE','TANIA','TOMMIE','ESMERALDA','KARINA','EVE','PEARLIE','ZELMA','MALINDA','NOREEN','TAMEKA','SAUNDRA','HILLARY','AMIE','ALTHEA','ROSALINDA','JORDAN','LILIA','ALANA','GAY','CLARE','ALEJANDRA','ELINOR','MICHAEL','LORRIE','JERRI','DARCY','EARNESTINE','CARMELLA','TAYLOR','NOEMI','MARCIE','LIZA','ANNABELLE','LOUISA','EARLENE','MALLORY','CARLENE','NITA','SELENA','TANISHA','KATY','JULIANNE','JOHN','LAKISHA','EDWINA','MARICELA','MARGERY','KENYA','DOLLIE','ROXIE','ROSLYN','KATHRINE','NANETTE','CHARMAINE','LAVONNE','ILENE','KRIS','TAMMI','SUZETTE','CORINE','KAYE','JERRY','MERLE','CHRYSTAL','LINA','DEANNE','LILIAN','JULIANA','ALINE','LUANN','KASEY','MARYANNE','EVANGELINE','COLETTE','MELVA','LAWANDA','YESENIA','NADIA','MADGE','KATHIE','EDDIE','OPHELIA','VALERIA','NONA','MITZI','MARI','GEORGETTE','CLAUDINE','FRAN','ALISSA','ROSEANN','LAKEISHA','SUSANNA','REVA','DEIDRE','CHASITY','SHEREE','CARLY','JAMES','ELVIA','ALYCE','DEIRDRE','GENA','BRIANA','ARACELI','KATELYN','ROSANNE','WENDI','TESSA','BERTA','MARVA','IMELDA','MARIETTA','MARCI','LEONOR','ARLINE','SASHA','MADELYN','JANNA','JULIETTE','DEENA','AURELIA','JOSEFA','AUGUSTA','LILIANA','YOUNG','CHRISTIAN','LESSIE','AMALIA','SAVANNAH','ANASTASIA','VILMA','NATALIA','ROSELLA','LYNNETTE','CORINA','ALFREDA','LEANNA','CAREY','AMPARO','COLEEN','TAMRA','AISHA','WILDA','KARYN','CHERRY','QUEEN','MAURA','MAI','EVANGELINA','ROSANNA','HALLIE','ERNA','ENID','MARIANA','LACY','JULIET','JACKLYN','FREIDA','MADELEINE','MARA','HESTER','CATHRYN','LELIA','CASANDRA','BRIDGETT','ANGELITA','JANNIE','DIONNE','ANNMARIE','KATINA','BERYL','PHOEBE','MILLICENT','KATHERYN','DIANN','CARISSA','MARYELLEN','LIZ','LAURI','HELGA','GILDA','ADRIAN','RHEA','MARQUITA','HOLLIE','TISHA','TAMERA','ANGELIQUE','FRANCESCA','BRITNEY','KAITLIN','LOLITA','FLORINE','ROWENA','REYNA','TWILA','FANNY','JANELL','INES','CONCETTA','BERTIE','ALBA','BRIGITTE','ALYSON','VONDA','PANSY','ELBA','NOELLE','LETITIA','KITTY','DEANN','BRANDIE','LOUELLA','LETA','FELECIA','SHARLENE','LESA','BEVERLEY','ROBERT','ISABELLA','HERMINIA','TERRA','CELINA','TORI','OCTAVIA','JADE','DENICE','GERMAINE','SIERRA','MICHELL','CORTNEY','NELLY','DORETHA','SYDNEY','DEIDRA','MONIKA','LASHONDA','JUDI','CHELSEY','ANTIONETTE','MARGOT','BOBBY','ADELAIDE','NAN','LEEANN','ELISHA','DESSIE','LIBBY','KATHI','GAYLA','LATANYA','MINA','MELLISA','KIMBERLEE','JASMIN','RENAE','ZELDA','ELDA','MA','JUSTINA','GUSSIE','EMILIE','CAMILLA','ABBIE','ROCIO','KAITLYN','JESSE','EDYTHE','ASHLEIGH','SELINA','LAKESHA','GERI','ALLENE','PAMALA','MICHAELA','DAYNA','CARYN','ROSALIA','SUN','JACQULINE','REBECA','MARYBETH','KRYSTLE','IOLA','DOTTIE','BENNIE','BELLE','AUBREY','GRISELDA','ERNESTINA','ELIDA','ADRIANNE','DEMETRIA','DELMA','CHONG','JAQUELINE','DESTINY','ARLEEN','VIRGINA','RETHA','FATIMA','TILLIE','ELEANORE','CARI','TREVA','BIRDIE','WILHELMINA','ROSALEE','MAURINE','LATRICE','YONG','JENA','TARYN','ELIA','DEBBY','MAUDIE','JEANNA','DELILAH','CATRINA','SHONDA','HORTENCIA','THEODORA','TERESITA','ROBBIN','DANETTE','MARYJANE','FREDDIE','DELPHINE','BRIANNE','NILDA','DANNA','CINDI','BESS','IONA','HANNA','ARIEL','WINONA','VIDA','ROSITA','MARIANNA','WILLIAM','RACHEAL','GUILLERMINA','ELOISA','CELESTINE','CAREN','MALISSA','LONA','CHANTEL','SHELLIE','MARISELA','LEORA','AGATHA','SOLEDAD','MIGDALIA','IVETTE','CHRISTEN','ATHENA','JANEL','CHLOE','VEDA','PATTIE','TESSIE','TERA','MARILYNN','LUCRETIA','KARRIE','DINAH','DANIELA','ALECIA','ADELINA','VERNICE','SHIELA','PORTIA','MERRY','LASHAWN','DEVON','DARA','TAWANA','OMA','VERDA','CHRISTIN','ALENE','ZELLA','SANDI','RAFAELA','MAYA','KIRA','CANDIDA','ALVINA','SUZAN','SHAYLA','LYN','LETTIE','ALVA','SAMATHA','ORALIA','MATILDE','MADONNA','LARISSA','VESTA','RENITA','INDIA','DELOIS','SHANDA','PHILLIS','LORRI','ERLINDA','CRUZ','CATHRINE','BARB','ZOE','ISABELL','IONE','GISELA','CHARLIE','VALENCIA','ROXANNA','MAYME','KISHA','ELLIE','MELLISSA','DORRIS','DALIA','BELLA','ANNETTA','ZOILA','RETA','REINA','LAURETTA','KYLIE','CHRISTAL','PILAR','CHARLA','ELISSA','TIFFANI','TANA','PAULINA','LEOTA','BREANNA','JAYME','CARMEL','VERNELL','TOMASA','MANDI','DOMINGA','SANTA','MELODIE','LURA','ALEXA','TAMELA','RYAN','MIRNA','KERRIE','VENUS','NOEL','FELICITA','CRISTY','CARMELITA','BERNIECE','ANNEMARIE','TIARA','ROSEANNE','MISSY','CORI','ROXANA','PRICILLA','KRISTAL','JUNG','ELYSE','HAYDEE','ALETHA','BETTINA','MARGE','GILLIAN','FILOMENA','CHARLES','ZENAIDA','HARRIETTE','CARIDAD','VADA','UNA','ARETHA','PEARLINE','MARJORY','MARCELA','FLOR','EVETTE','ELOUISE','ALINA','TRINIDAD','DAVID','DAMARIS','CATHARINE','CARROLL','BELVA','NAKIA','MARLENA','LUANNE','LORINE','KARON','DORENE','DANITA','BRENNA','TATIANA','SAMMIE','LOUANN','LOREN','JULIANNA','ANDRIA','PHILOMENA','LUCILA','LEONORA','DOVIE','ROMONA','MIMI','JACQUELIN','GAYE','TONJA','MISTI','JOE','GENE','CHASTITY','STACIA','ROXANN','MICAELA','NIKITA','MEI','VELDA','MARLYS','JOHNNA','AURA','LAVERN','IVONNE','HAYLEY','NICKI','MAJORIE','HERLINDA','GEORGE','ALPHA','YADIRA','PERLA','GREGORIA','DANIEL','ANTONETTE','SHELLI','MOZELLE','MARIAH','JOELLE','CORDELIA','JOSETTE','CHIQUITA','TRISTA','LOUIS','LAQUITA','GEORGIANA','CANDI','SHANON','LONNIE','HILDEGARD','CECIL','VALENTINA','STEPHANY','MAGDA','KAROL','GERRY','GABRIELLA','TIANA','ROMA','RICHELLE','RAY','PRINCESS','OLETA','JACQUE','IDELLA','ALAINA','SUZANNA','JOVITA','BLAIR','TOSHA','RAVEN','NEREIDA','MARLYN','KYLA','JOSEPH','DELFINA','TENA','STEPHENIE','SABINA','NATHALIE','MARCELLE','GERTIE','DARLEEN','THEA','SHARONDA','SHANTEL','BELEN','VENESSA','ROSALINA','ONA','GENOVEVA','COREY','CLEMENTINE','ROSALBA','RENATE','RENATA','MI','IVORY','GEORGIANNA','FLOY','DORCAS','ARIANA','TYRA','THEDA','MARIAM','JULI','JESICA','DONNIE','VIKKI','VERLA','ROSELYN','MELVINA','JANNETTE','GINNY','DEBRAH','CORRIE','ASIA','VIOLETA','MYRTIS','LATRICIA','COLLETTE','CHARLEEN','ANISSA','VIVIANA','TWYLA','PRECIOUS','NEDRA','LATONIA','LAN','HELLEN','FABIOLA','ANNAMARIE','ADELL','SHARYN','CHANTAL','NIKI','MAUD','LIZETTE','LINDY','KIA','KESHA','JEANA','DANELLE','CHARLINE','CHANEL','CARROL','VALORIE','LIA','DORTHA','CRISTAL','SUNNY','LEONE','LEILANI','GERRI','DEBI','ANDRA','KESHIA','IMA','EULALIA','EASTER','DULCE','NATIVIDAD','LINNIE','KAMI','GEORGIE','CATINA','BROOK','ALDA','WINNIFRED','SHARLA','RUTHANN','MEAGHAN','MAGDALENE','LISSETTE','ADELAIDA','VENITA','TRENA','SHIRLENE','SHAMEKA','ELIZEBETH','DIAN','SHANTA','MICKEY','LATOSHA','CARLOTTA','WINDY','SOON','ROSINA','MARIANN','LEISA','JONNIE','DAWNA','CATHIE','BILLY','ASTRID','SIDNEY','LAUREEN','JANEEN','HOLLI','FAWN','VICKEY','TERESSA','SHANTE','RUBYE','MARCELINA','CHANDA','CARY','TERESE','SCARLETT','MARTY','MARNIE','LULU','LISETTE','JENIFFER','ELENOR','DORINDA','DONITA','CARMAN','BERNITA','ALTAGRACIA','ALETA','ADRIANNA','ZORAIDA','RONNIE','NICOLA','LYNDSEY','KENDALL','JANINA','CHRISSY','AMI','STARLA','PHYLIS','PHUONG','KYRA','CHARISSE','BLANCH','SANJUANITA','RONA','NANCI','MARILEE','MARANDA','CORY','BRIGETTE','SANJUANA','MARITA','KASSANDRA','JOYCELYN','IRA','FELIPA','CHELSIE','BONNY','MIREYA','LORENZA','KYONG','ILEANA','CANDELARIA','TONY','TOBY','SHERIE','OK','MARK','LUCIE','LEATRICE','LAKESHIA','GERDA','EDIE','BAMBI','MARYLIN','LAVON','HORTENSE','GARNET','EVIE','TRESSA','SHAYNA','LAVINA','KYUNG','JEANETTA','SHERRILL','SHARA','PHYLISS','MITTIE','ANABEL','ALESIA','THUY','TAWANDA','RICHARD','JOANIE','TIFFANIE','LASHANDA','KARISSA','ENRIQUETA','DARIA','DANIELLA','CORINNA','ALANNA','ABBEY','ROXANE','ROSEANNA','MAGNOLIA','LIDA','KYLE','JOELLEN','ERA','CORAL','CARLEEN','TRESA','PEGGIE','NOVELLA','NILA','MAYBELLE','JENELLE','CARINA','NOVA','MELINA','MARQUERITE','MARGARETTE','JOSEPHINA','EVONNE','DEVIN','CINTHIA','ALBINA','TOYA','TAWNYA','SHERITA','SANTOS','MYRIAM','LIZABETH','LISE','KEELY','JENNI','GISELLE','CHERYLE','ARDITH','ARDIS','ALESHA','ADRIANE','SHAINA','LINNEA','KAROLYN','HONG','FLORIDA','FELISHA','DORI','DARCI','ARTIE','ARMIDA','ZOLA','XIOMARA','VERGIE','SHAMIKA','NENA','NANNETTE','MAXIE','LOVIE','JEANE','JAIMIE','INGE','FARRAH','ELAINA','CAITLYN','STARR','FELICITAS','CHERLY','CARYL','YOLONDA','YASMIN','TEENA','PRUDENCE','PENNIE','NYDIA','MACKENZIE','ORPHA','MARVEL','LIZBETH','LAURETTE','JERRIE','HERMELINDA','CAROLEE','TIERRA','MIRIAN','META','MELONY','KORI','JENNETTE','JAMILA','ENA','ANH','YOSHIKO','SUSANNAH','SALINA','RHIANNON','JOLEEN','CRISTINE','ASHTON','ARACELY','TOMEKA','SHALONDA','MARTI','LACIE','KALA','JADA','ILSE','HAILEY','BRITTANI','ZONA','SYBLE','SHERRYL','RANDY','NIDIA','MARLO','KANDICE','KANDI','DEB','DEAN','AMERICA','ALYCIA','TOMMY','RONNA','NORENE','MERCY','JOSE','INGEBORG','GIOVANNA','GEMMA','CHRISTEL','AUDRY','ZORA','VITA','VAN','TRISH','STEPHAINE','SHIRLEE','SHANIKA','MELONIE','MAZIE','JAZMIN','INGA','HOA','HETTIE','GERALYN','FONDA','ESTRELLA','ADELLA','SU','SARITA','RINA','MILISSA','MARIBETH','GOLDA','EVON','ETHELYN','ENEDINA','CHERISE','CHANA','VELVA','TAWANNA','SADE','MIRTA','LI','KARIE','JACINTA','ELNA','DAVINA','CIERRA','ASHLIE','ALBERTHA','TANESHA','STEPHANI','NELLE','MINDI','LU','LORINDA','LARUE','FLORENE','DEMETRA','DEDRA','CIARA','CHANTELLE','ASHLY','SUZY','ROSALVA','NOELIA','LYDA','LEATHA','KRYSTYNA','KRISTAN','KARRI','DARLINE','DARCIE','CINDA','CHEYENNE','CHERRIE','AWILDA','ALMEDA','ROLANDA','LANETTE','JERILYN','GISELE','EVALYN','CYNDI','CLETA','CARIN','ZINA','ZENA','VELIA','TANIKA','PAUL','CHARISSA','THOMAS','TALIA','MARGARETE','LAVONDA','KAYLEE','KATHLENE','JONNA','IRENA','ILONA','IDALIA','CANDIS','CANDANCE','BRANDEE','ANITRA','ALIDA','SIGRID','NICOLETTE','MARYJO','LINETTE','HEDWIG','CHRISTIANA','CASSIDY','ALEXIA','TRESSIE','MODESTA','LUPITA','LITA','GLADIS','EVELIA','DAVIDA','CHERRI','CECILY','ASHELY','ANNABEL','AGUSTINA','WANITA','SHIRLY','ROSAURA','HULDA','EUN','BAILEY','YETTA','VERONA','THOMASINA','SIBYL','SHANNAN','MECHELLE','LUE','LEANDRA','LANI','KYLEE','KANDY','JOLYNN','FERNE','EBONI','CORENE','ALYSIA','ZULA','NADA','MOIRA','LYNDSAY','LORRETTA','JUAN','JAMMIE','HORTENSIA','GAYNELL','CAMERON','ADRIA','VINA','VICENTA','TANGELA','STEPHINE','NORINE','NELLA','LIANA','LESLEE','KIMBERELY','ILIANA','GLORY','FELICA','EMOGENE','ELFRIEDE','EDEN','EARTHA','CARMA','BEA','OCIE','MARRY','LENNIE','KIARA','JACALYN','CARLOTA','ARIELLE','YU','STAR','OTILIA','KIRSTIN','KACEY','JOHNETTA','JOEY','JOETTA','JERALDINE','JAUNITA','ELANA','DORTHEA','CAMI','AMADA','ADELIA','VERNITA','TAMAR','SIOBHAN','RENEA','RASHIDA','OUIDA','ODELL','NILSA','MERYL','KRISTYN','JULIETA','DANICA','BREANNE','AUREA','ANGLEA','SHERRON','ODETTE','MALIA','LORELEI','LIN','LEESA','KENNA','KATHLYN','FIONA','CHARLETTE','SUZIE','SHANTELL','SABRA','RACQUEL','MYONG','MIRA','MARTINE','LUCIENNE','LAVADA','JULIANN','JOHNIE','ELVERA','DELPHIA','CLAIR','CHRISTIANE','CHAROLETTE','CARRI','AUGUSTINE','ASHA','ANGELLA','PAOLA','NINFA','LEDA','LAI','EDA','SUNSHINE','STEFANI','SHANELL','PALMA','MACHELLE','LISSA','KECIA','KATHRYNE','KARLENE','JULISSA','JETTIE','JENNIFFER','HUI','CORRINA','CHRISTOPHER','CAROLANN','ALENA','TESS','ROSARIA','MYRTICE','MARYLEE','LIANE','KENYATTA','JUDIE','JANEY','IN','ELMIRA','ELDORA','DENNA','CRISTI','CATHI','ZAIDA','VONNIE','VIVA','VERNIE','ROSALINE','MARIELA','LUCIANA','LESLI','KARAN','FELICE','DENEEN','ADINA','WYNONA','TARSHA','SHERON','SHASTA','SHANITA','SHANI','SHANDRA','RANDA','PINKIE','PARIS','NELIDA','MARILOU','LYLA','LAURENE','LACI','JOI','JANENE','DOROTHA','DANIELE','DANI','CAROLYNN','CARLYN','BERENICE','AYESHA','ANNELIESE','ALETHEA','THERSA','TAMIKO','RUFINA','OLIVA','MOZELL','MARYLYN','MADISON','KRISTIAN','KATHYRN','KASANDRA','KANDACE','JANAE','GABRIEL','DOMENICA','DEBBRA','DANNIELLE','CHUN','BUFFY','BARBIE','ARCELIA','AJA','ZENOBIA','SHAREN','SHAREE','PATRICK','PAGE','MY','LAVINIA','KUM','KACIE','JACKELINE','HUONG','FELISA','EMELIA','ELEANORA','CYTHIA','CRISTIN','CLYDE','CLARIBEL','CARON','ANASTACIA','ZULMA','ZANDRA','YOKO','TENISHA','SUSANN','SHERILYN','SHAY','SHAWANDA','SABINE','ROMANA','MATHILDA','LINSEY','KEIKO','JOANA','ISELA','GRETTA','GEORGETTA','EUGENIE','DUSTY','DESIRAE','DELORA','CORAZON','ANTONINA','ANIKA','WILLENE','TRACEE','TAMATHA','REGAN','NICHELLE','MICKIE','MAEGAN','LUANA','LANITA','KELSIE','EDELMIRA','BREE','AFTON','TEODORA','TAMIE','SHENA','MEG','LINH','KELI','KACI','DANYELLE','BRITT','ARLETTE','ALBERTINE','ADELLE','TIFFINY','STORMY','SIMONA','NUMBERS','NICOLASA','NICHOL','NIA','NAKISHA','MEE','MAIRA','LOREEN','KIZZY','JOHNNY','JAY','FALLON','CHRISTENE','BOBBYE','ANTHONY','YING','VINCENZA','TANJA','RUBIE','RONI','QUEENIE','MARGARETT','KIMBERLI','IRMGARD','IDELL','HILMA','EVELINA','ESTA','EMILEE','DENNISE','DANIA','CARL','CARIE','ANTONIO','WAI','SANG','RISA','RIKKI','PARTICIA','MUI','MASAKO','MARIO','LUVENIA','LOREE','LONI','LIEN','KEVIN','GIGI','FLORENCIA','DORIAN','DENITA','DALLAS','CHI','BILLYE','ALEXANDER','TOMIKA','SHARITA','RANA','NIKOLE','NEOMA','MARGARITE','MADALYN','LUCINA','LAILA','KALI','JENETTE','GABRIELE','EVELYNE','ELENORA','CLEMENTINA','ALEJANDRINA','ZULEMA','VIOLETTE','VANNESSA','THRESA','RETTA','PIA','PATIENCE','NOELLA','NICKIE','JONELL','DELTA','CHUNG','CHAYA','CAMELIA','BETHEL','ANYA','ANDREW','THANH','SUZANN','SPRING','SHU','MILA','LILLA','LAVERNA','KEESHA','KATTIE','GIA','GEORGENE','EVELINE','ESTELL','ELIZBETH','VIVIENNE','VALLIE','TRUDIE','STEPHANE','MICHEL','MAGALY','MADIE','KENYETTA','KARREN','JANETTA','HERMINE','HARMONY','DRUCILLA','DEBBI','CELESTINA','CANDIE','BRITNI','BECKIE','AMINA','ZITA','YUN','YOLANDE','VIVIEN','VERNETTA','TRUDI','SOMMER','PEARLE','PATRINA','OSSIE','NICOLLE','LOYCE','LETTY','LARISA','KATHARINA','JOSELYN','JONELLE','JENELL','IESHA','HEIDE','FLORINDA','FLORENTINA','FLO','ELODIA','DORINE','BRUNILDA','BRIGID','ASHLI','ARDELLA','TWANA','THU','TARAH','SUNG','SHEA','SHAVON','SHANE','SERINA','RAYNA','RAMONITA','NGA','MARGURITE','LUCRECIA','KOURTNEY','KATI','JESUS','JESENIA','DIAMOND','CRISTA','AYANA','ALICA','ALIA','VINNIE','SUELLEN','ROMELIA','RACHELL','PIPER','OLYMPIA','MICHIKO','KATHALEEN','JOLIE','JESSI','JANESSA','HANA','HA','ELEASE','CARLETTA','BRITANY','SHONA','SALOME','ROSAMOND','REGENA','RAINA','NGOC','NELIA','LOUVENIA','LESIA','LATRINA','LATICIA','LARHONDA','JINA','JACKI','HOLLIS','HOLLEY','EMMY','DEEANN','CORETTA','ARNETTA','VELVET','THALIA','SHANICE','NETA','MIKKI','MICKI','LONNA','LEANA','LASHUNDA','KILEY','JOYE','JACQULYN','IGNACIA','HYUN','HIROKO','HENRY','HENRIETTE','ELAYNE','DELINDA','DARNELL','DAHLIA','COREEN','CONSUELA','CONCHITA','CELINE','BABETTE','AYANNA','ANETTE','ALBERTINA','SKYE','SHAWNEE','SHANEKA','QUIANA','PAMELIA','MIN','MERRI','MERLENE','MARGIT','KIESHA','KIERA','KAYLENE','JODEE','JENISE','ERLENE','EMMIE','ELSE','DARYL','DALILA','DAISEY','CODY','CASIE','BELIA','BABARA','VERSIE','VANESA','SHELBA','SHAWNDA','SAM','NORMAN','NIKIA','NAOMA','MARNA','MARGERET','MADALINE','LAWANA','KINDRA','JUTTA','JAZMINE','JANETT','HANNELORE','GLENDORA','GERTRUD','GARNETT','FREEDA','FREDERICA','FLORANCE','FLAVIA','DENNIS','CARLINE','BEVERLEE','ANJANETTE','VALDA','TRINITY','TAMALA','STEVIE','SHONNA','SHA','SARINA','ONEIDA','MICAH','MERILYN','MARLEEN','LURLINE','LENNA','KATHERIN','JIN','JENI','HAE','GRACIA','GLADY','FARAH','ERIC','ENOLA','EMA','DOMINQUE','DEVONA','DELANA','CECILA','CAPRICE','ALYSHA','ALI','ALETHIA','VENA','THERESIA','TAWNY','SONG','SHAKIRA','SAMARA','SACHIKO','RACHELE','PAMELLA','NICKY','MARNI','MARIEL','MAREN','MALISA','LIGIA','LERA','LATORIA','LARAE','KIMBER','KATHERN','KAREY','JENNEFER','JANETH','HALINA','FREDIA','DELISA','DEBROAH','CIERA','CHIN','ANGELIKA','ANDREE','ALTHA','YEN','VIVAN','TERRESA','TANNA','SUK','SUDIE','SOO','SIGNE','SALENA','RONNI','REBBECCA','MYRTIE','MCKENZIE','MALIKA','MAIDA','LOAN','LEONARDA','KAYLEIGH','FRANCE','ETHYL','ELLYN','DAYLE','CAMMIE','BRITTNI','BIRGIT','AVELINA','ASUNCION','ARIANNA','AKIKO','VENICE','TYESHA','TONIE','TIESHA','TAKISHA','STEFFANIE','SINDY','SANTANA','MEGHANN','MANDA','MACIE','LADY','KELLYE','KELLEE','JOSLYN','JASON','INGER','INDIRA','GLINDA','GLENNIS','FERNANDA','FAUSTINA','ENEIDA','ELICIA','DOT','DIGNA','DELL','ARLETTA','ANDRE','WILLIA','TAMMARA','TABETHA','SHERRELL','SARI','REFUGIO','REBBECA','PAULETTA','NIEVES','NATOSHA','NAKITA','MAMMIE','KENISHA','KAZUKO','KASSIE','GARY','EARLEAN','DAPHINE','CORLISS','CLOTILDE','CAROLYNE','BERNETTA','AUGUSTINA','AUDREA','ANNIS','ANNABELL','YAN','TENNILLE','TAMICA','SELENE','SEAN','ROSANA','REGENIA','QIANA','MARKITA','MACY','LEEANNE','LAURINE','KYM','JESSENIA','JANITA','GEORGINE','GENIE','EMIKO','ELVIE','DEANDRA','DAGMAR','CORIE','COLLEN','CHERISH','ROMAINE','PORSHA','PEARLENE','MICHELINE','MERNA','MARGORIE','MARGARETTA','LORE','KENNETH','JENINE','HERMINA','FREDERICKA','ELKE','DRUSILLA','DORATHY','DIONE','DESIRE','CELENA','BRIGIDA','ANGELES','ALLEGRA','THEO','TAMEKIA','SYNTHIA','STEPHEN','SOOK','SLYVIA','ROSANN','REATHA','RAYE','MARQUETTA','MARGART','LING','LAYLA','KYMBERLY','KIANA','KAYLEEN','KATLYN','KARMEN','JOELLA','IRINA','EMELDA','ELENI','DETRA','CLEMMIE','CHERYLL','CHANTELL','CATHEY','ARNITA','ARLA','ANGLE','ANGELIC','ALYSE','ZOFIA','THOMASINE','TENNIE','SON','SHERLY','SHERLEY','SHARYL','REMEDIOS','PETRINA','NICKOLE','MYUNG','MYRLE','MOZELLA','LOUANNE','LISHA','LATIA','LANE','KRYSTA','JULIENNE','JOEL','JEANENE','JACQUALINE','ISAURA','GWENDA','EARLEEN','DONALD','CLEOPATRA','CARLIE','AUDIE','ANTONIETTA','ALISE','ALEX','VERDELL','VAL','TYLER','TOMOKO','THAO','TALISHA','STEVEN','SO','SHEMIKA','SHAUN','SCARLET','SAVANNA','SANTINA','ROSIA','RAEANN','ODILIA','NANA','MINNA','MAGAN','LYNELLE','LE','KARMA','JOEANN','IVANA','INELL','ILANA','HYE','HONEY','HEE','GUDRUN','FRANK','DREAMA','CRISSY','CHANTE','CARMELINA','ARVILLA','ARTHUR','ANNAMAE','ALVERA','ALEIDA','AARON','YEE','YANIRA','VANDA','TIANNA','TAM','STEFANIA','SHIRA','PERRY','NICOL','NANCIE','MONSERRATE','MINH','MELYNDA','MELANY','MATTHEW','LOVELLA','LAURE','KIRBY','KACY','JACQUELYNN','HYON','GERTHA','FRANCISCO','ELIANA','CHRISTENA','CHRISTEEN','CHARISE','CATERINA','CARLEY','CANDYCE','ARLENA','AMMIE','YANG','WILLETTE','VANITA','TUYET','TINY','SYREETA','SILVA','SCOTT','RONALD','PENNEY','NYLA','MICHAL','MAURICE','MARYAM','MARYA','MAGEN','LUDIE','LOMA','LIVIA','LANELL','KIMBERLIE','JULEE','DONETTA','DIEDRA','DENISHA','DEANE','DAWNE','CLARINE','CHERRYL','BRONWYN','BRANDON','ALLA','VALERY','TONDA','SUEANN','SORAYA','SHOSHANA','SHELA','SHARLEEN','SHANELLE','NERISSA','MICHEAL','MERIDITH','MELLIE','MAYE','MAPLE','MAGARET','LUIS','LILI','LEONILA','LEONIE','LEEANNA','LAVONIA','LAVERA','KRISTEL','KATHEY','KATHE','JUSTIN','JULIAN','JIMMY','JANN','ILDA','HILDRED','HILDEGARDE','GENIA','FUMIKO','EVELIN','ERMELINDA','ELLY','DUNG','DOLORIS','DIONNA','DANAE','BERNEICE','ANNICE','ALIX','VERENA','VERDIE','TRISTAN','SHAWNNA','SHAWANA','SHAUNNA','ROZELLA','RANDEE','RANAE','MILAGRO','LYNELL','LUISE','LOUIE','LOIDA','LISBETH','KARLEEN','JUNITA','JONA','ISIS','HYACINTH','HEDY','GWENN','ETHELENE','ERLINE','EDWARD','DONYA','DOMONIQUE','DELICIA','DANNETTE','CICELY','BRANDA','BLYTHE','BETHANN','ASHLYN','ANNALEE','ALLINE','YUKO','VELLA','TRANG','TOWANDA','TESHA','SHERLYN','NARCISA','MIGUELINA','MERI','MAYBELL','MARLANA','MARGUERITA','MADLYN','LUNA','LORY','LORIANN','LIBERTY','LEONORE','LEIGHANN','LAURICE','LATESHA','LARONDA','KATRICE','KASIE','KARL','KALEY','JADWIGA','GLENNIE','GEARLDINE','FRANCINA','EPIFANIA','DYAN','DORIE','DIEDRE','DENESE','DEMETRICE','DELENA','DARBY','CRISTIE','CLEORA','CATARINA','CARISA','BERNIE','BARBERA','ALMETA','TRULA','TEREASA','SOLANGE','SHEILAH','SHAVONNE','SANORA','ROCHELL','MATHILDE','MARGARETA','MAIA','LYNSEY','LAWANNA','LAUNA','KENA','KEENA','KATIA','JAMEY','GLYNDA','GAYLENE','ELVINA','ELANOR','DANUTA','DANIKA','CRISTEN','CORDIE','COLETTA','CLARITA','CARMON','BRYNN','AZUCENA','AUNDREA','ANGELE','YI','WALTER','VERLIE','VERLENE','TAMESHA','SILVANA','SEBRINA','SAMIRA','REDA','RAYLENE','PENNI','PANDORA','NORAH','NOMA','MIREILLE','MELISSIA','MARYALICE','LARAINE','KIMBERY','KARYL','KARINE','KAM','JOLANDA','JOHANA','JESUSA','JALEESA','JAE','JACQUELYNE','IRISH','ILUMINADA','HILARIA','HANH','GENNIE','FRANCIE','FLORETTA','EXIE','EDDA','DREMA','DELPHA','BEV','BARBAR','ASSUNTA','ARDELL','ANNALISA','ALISIA','YUKIKO','YOLANDO','WONDA','WEI','WALTRAUD','VETA','TEQUILA','TEMEKA','TAMEIKA','SHIRLEEN','SHENITA','PIEDAD','OZELLA','MIRTHA','MARILU','KIMIKO','JULIANE','JENICE','JEN','JANAY','JACQUILINE','HILDE','FE','FAE','EVAN','EUGENE','ELOIS','ECHO','DEVORAH','CHAU','BRINDA','BETSEY','ARMINDA','ARACELIS','APRYL','ANNETT','ALISHIA','VEOLA','USHA','TOSHIKO','THEOLA','TASHIA','TALITHA','SHERY','RUDY','RENETTA','REIKO','RASHEEDA','OMEGA','OBDULIA','MIKA','MELAINE','MEGGAN','MARTIN','MARLEN','MARGET','MARCELINE','MANA','MAGDALEN','LIBRADA','LEZLIE','LEXIE','LATASHIA','LASANDRA','KELLE','ISIDRA','ISA','INOCENCIA','GWYN','FRANCOISE','ERMINIA','ERINN','DIMPLE','DEVORA','CRISELDA','ARMANDA','ARIE','ARIANE','ANGELO','ANGELENA','ALLEN','ALIZA','ADRIENE','ADALINE','XOCHITL','TWANNA','TRAN','TOMIKO','TAMISHA','TAISHA','SUSY','SIU','RUTHA','ROXY','RHONA','RAYMOND','OTHA','NORIKO','NATASHIA','MERRIE','MELVIN','MARINDA','MARIKO','MARGERT','LORIS','LIZZETTE','LEISHA','KAILA','KA','JOANNIE','JERRICA','JENE','JANNET','JANEE','JACINDA','HERTA','ELENORE','DORETTA','DELAINE','DANIELL','CLAUDIE','CHINA','BRITTA','APOLONIA','AMBERLY','ALEASE','YURI','YUK','WEN','WANETA','UTE','TOMI','SHARRI','SANDIE','ROSELLE','REYNALDA','RAGUEL','PHYLICIA','PATRIA','OLIMPIA','ODELIA','MITZIE','MITCHELL','MISS','MINDA','MIGNON','MICA','MENDY','MARIVEL','MAILE','LYNETTA','LAVETTE','LAURYN','LATRISHA','LAKIESHA','KIERSTEN','KARY','JOSPHINE','JOLYN','JETTA','JANISE','JACQUIE','IVELISSE','GLYNIS','GIANNA','GAYNELLE','EMERALD','DEMETRIUS','DANYELL','DANILLE','DACIA','CORALEE','CHER','CEOLA','BRETT','BELL','ARIANNE','ALESHIA','YUNG','WILLIEMAE','TROY','TRINH','THORA','TAI','SVETLANA','SHERIKA','SHEMEKA','SHAUNDA','ROSELINE','RICKI','MELDA','MALLIE','LAVONNA','LATINA','LARRY','LAQUANDA','LALA','LACHELLE','KLARA','KANDIS','JOHNA','JEANMARIE','JAYE','HANG','GRAYCE','GERTUDE','EMERITA','EBONIE','CLORINDA','CHING','CHERY','CAROLA','BREANN','BLOSSOM','BERNARDINE','BECKI','ARLETHA','ARGELIA','ARA','ALITA','YULANDA','YON','YESSENIA','TOBI','TASIA','SYLVIE','SHIRL','SHIRELY','SHERIDAN','SHELLA','SHANTELLE','SACHA','ROYCE','REBECKA','REAGAN','PROVIDENCIA','PAULENE','MISHA','MIKI','MARLINE','MARICA','LORITA','LATOYIA','LASONYA','KERSTIN','KENDA','KEITHA','KATHRIN','JAYMIE','JACK','GRICELDA','GINETTE','ERYN','ELINA','ELFRIEDA','DANYEL','CHEREE','CHANELLE','BARRIE','AVERY','AURORE','ANNAMARIA','ALLEEN','AILENE','AIDE','YASMINE','VASHTI','VALENTINE','TREASA','TORY','TIFFANEY','SHERYLL','SHARIE','SHANAE','SAU','RAISA','PA','NEDA','MITSUKO','MIRELLA','MILDA','MARYANNA','MARAGRET','MABELLE','LUETTA','LORINA','LETISHA','LATARSHA','LANELLE','LAJUANA','KRISSY','KARLY','KARENA','JON','JESSIKA','JERICA','JEANELLE','JANUARY','JALISA','JACELYN','IZOLA','IVEY','GREGORY','EUNA','ETHA','DREW','DOMITILA','DOMINICA','DAINA','CREOLA','CARLI','CAMIE','BUNNY','BRITTNY','ASHANTI','ANISHA','ALEEN','ADAH','YASUKO','WINTER','VIKI','VALRIE','TONA','TINISHA','THI','TERISA','TATUM','TANEKA','SIMONNE','SHALANDA','SERITA','RESSIE','REFUGIA','PAZ','OLENE','NA','MERRILL','MARGHERITA','MANDIE','MAN','MAIRE','LYNDIA','LUCI','LORRIANE','LORETA','LEONIA','LAVONA','LASHAWNDA','LAKIA','KYOKO','KRYSTINA','KRYSTEN','KENIA','KELSI','JUDE','JEANICE','ISOBEL','GEORGIANN','GENNY','FELICIDAD','EILENE','DEON','DELOISE','DEEDEE','DANNIE','CONCEPTION','CLORA','CHERILYN','CHANG','CALANDRA','BERRY','ARMANDINA','ANISA','ULA','TIMOTHY','TIERA','THERESSA','STEPHANIA','SIMA','SHYLA','SHONTA','SHERA','SHAQUITA','SHALA','SAMMY','ROSSANA','NOHEMI','NERY','MORIAH','MELITA','MELIDA','MELANI','MARYLYNN','MARISHA','MARIETTE','MALORIE','MADELENE','LUDIVINA','LORIA','LORETTE','LORALEE','LIANNE','LEON','LAVENIA','LAURINDA','LASHON','KIT','KIMI','KEILA','KATELYNN','KAI','JONE','JOANE','JI','JAYNA','JANELLA','JA','HUE','HERTHA','FRANCENE','ELINORE','DESPINA','DELSIE','DEEDRA','CLEMENCIA','CARRY','CAROLIN','CARLOS','BULAH','BRITTANIE','BOK','BLONDELL','BIBI','BEAULAH','BEATA','ANNITA','AGRIPINA','VIRGEN','VALENE','UN','TWANDA','TOMMYE','TOI','TARRA','TARI','TAMMERA','SHAKIA','SADYE','RUTHANNE','ROCHEL','RIVKA','PURA','NENITA','NATISHA','MING','MERRILEE','MELODEE','MARVIS','LUCILLA','LEENA','LAVETA','LARITA','LANIE','KEREN','ILEEN','GEORGEANN','GENNA','GENESIS','FRIDA','EWA','EUFEMIA','EMELY','ELA','EDYTH','DEONNA','DEADRA','DARLENA','CHANELL','CHAN','CATHERN','CASSONDRA','CASSAUNDRA','BERNARDA','BERNA','ARLINDA','ANAMARIA','ALBERT','WESLEY','VERTIE','VALERI','TORRI','TATYANA','STASIA','SHERISE','SHERILL','SEASON','SCOTTIE','SANDA','RUTHE','ROSY','ROBERTO','ROBBI','RANEE','QUYEN','PEARLY','PALMIRA','ONITA','NISHA','NIESHA','NIDA','NEVADA','NAM','MERLYN','MAYOLA','MARYLOUISE','MARYLAND','MARX','MARTH','MARGENE','MADELAINE','LONDA','LEONTINE','LEOMA','LEIA','LAWRENCE','LAURALEE','LANORA','LAKITA','KIYOKO','KETURAH','KATELIN','KAREEN','JONIE','JOHNETTE','JENEE','JEANETT','IZETTA','HIEDI','HEIKE','HASSIE','HAROLD','GIUSEPPINA','GEORGANN','FIDELA','FERNANDE','ELWANDA','ELLAMAE','ELIZ','DUSTI','DOTTY','CYNDY','CORALIE','CELESTA','ARGENTINA','ALVERTA','XENIA','WAVA','VANETTA','TORRIE','TASHINA','TANDY','TAMBRA','TAMA','STEPANIE','SHILA','SHAUNTA','SHARAN','SHANIQUA','SHAE','SETSUKO','SERAFINA','SANDEE','ROSAMARIA','PRISCILA','OLINDA','NADENE','MUOI','MICHELINA','MERCEDEZ','MARYROSE','MARIN','MARCENE','MAO','MAGALI','MAFALDA','LOGAN','LINN','LANNIE','KAYCE','KAROLINE','KAMILAH','KAMALA','JUSTA','JOLINE','JENNINE','JACQUETTA','IRAIDA','GERALD','GEORGEANNA','FRANCHESCA','FAIRY','EMELINE','ELANE','EHTEL','EARLIE','DULCIE','DALENE','CRIS','CLASSIE','CHERE','CHARIS','CAROYLN','CARMINA','CARITA','BRIAN','BETHANIE','AYAKO','ARICA','AN','ALYSA','ALESSANDRA','AKILAH','ADRIEN','ZETTA','YOULANDA','YELENA','YAHAIRA','XUAN','WENDOLYN','VICTOR','TIJUANA','TERRELL','TERINA','TERESIA','SUZI','SUNDAY','SHERELL','SHAVONDA','SHAUNTE','SHARDA','SHAKITA','SENA','RYANN','RUBI','RIVA','REGINIA','REA','RACHAL','PARTHENIA','PAMULA','MONNIE','MONET','MICHAELE','MELIA','MARINE','MALKA','MAISHA','LISANDRA','LEO','LEKISHA','LEAN','LAURENCE','LAKENDRA','KRYSTIN','KORTNEY','KIZZIE','KITTIE','KERA','KENDAL','KEMBERLY','KANISHA','JULENE','JULE','JOSHUA','JOHANNE','JEFFREY','JAMEE','HAN','HALLEY','GIDGET','GALINA','FREDRICKA','FLETA','FATIMAH','EUSEBIA','ELZA','ELEONORE','DORTHEY','DORIA','DONELLA','DINORAH','DELORSE','CLARETHA','CHRISTINIA','CHARLYN','BONG','BELKIS','AZZIE','ANDERA','AIKO','ADENA','YER','YAJAIRA','WAN','VANIA','ULRIKE','TOSHIA','TIFANY','STEFANY','SHIZUE','SHENIKA','SHAWANNA','SHAROLYN','SHARILYN','SHAQUANA','SHANTAY','SEE','ROZANNE','ROSELEE','RICKIE','REMONA','REANNA','RAELENE','QUINN','PHUNG','PETRONILA','NATACHA','NANCEY','MYRL','MIYOKO','MIESHA','MERIDETH','MARVELLA','MARQUITTA','MARHTA','MARCHELLE','LIZETH','LIBBIE','LAHOMA','LADAWN','KINA','KATHELEEN','KATHARYN','KARISA','KALEIGH','JUNIE','JULIEANN','JOHNSIE','JANEAN','JAIMEE','JACKQUELINE','HISAKO','HERMA','HELAINE','GWYNETH','GLENN','GITA','EUSTOLIA','EMELINA','ELIN','EDRIS','DONNETTE','DONNETTA','DIERDRE','DENAE','DARCEL','CLAUDE','CLARISA','CINDERELLA','CHIA','CHARLESETTA','CHARITA','CELSA','CASSY','CASSI','CARLEE','BRUNA','BRITTANEY','BRANDE','BILLI','BAO','ANTONETTA','ANGLA','ANGELYN','ANALISA','ALANE','WENONA','WENDIE','VERONIQUE','VANNESA','TOBIE','TEMPIE','SUMIKO','SULEMA','SPARKLE','SOMER','SHEBA','SHAYNE','SHARICE','SHANEL','SHALON','SAGE','ROY','ROSIO','ROSELIA','RENAY','REMA','REENA','PORSCHE','PING','PEG','OZIE','ORETHA','ORALEE','ODA','NU','NGAN','NAKESHA','MILLY','MARYBELLE','MARLIN','MARIS','MARGRETT','MARAGARET','MANIE','LURLENE','LILLIA','LIESELOTTE','LAVELLE','LASHAUNDA','LAKEESHA','KEITH','KAYCEE','KALYN','JOYA','JOETTE','JENAE','JANIECE','ILLA','GRISEL','GLAYDS','GENEVIE','GALA','FREDDA','FRED','ELMER','ELEONOR','DEBERA','DEANDREA','DAN','CORRINNE','CORDIA','CONTESSA','COLENE','CLEOTILDE','CHARLOTT','CHANTAY','CECILLE','BEATRIS','AZALEE','ARLEAN','ARDATH','ANJELICA','ANJA','ALFREDIA','ALEISHA','ADAM','ZADA','YUONNE','XIAO','WILLODEAN','WHITLEY','VENNIE','VANNA','TYISHA','TOVA','TORIE','TONISHA','TILDA','TIEN','TEMPLE','SIRENA','SHERRIL','SHANTI','SHAN','SENAIDA','SAMELLA','ROBBYN','RENDA','REITA','PHEBE','PAULITA','NOBUKO','NGUYET','NEOMI','MOON','MIKAELA','MELANIA','MAXIMINA','MARG','MAISIE','LYNNA','LILLI','LAYNE','LASHAUN','LAKENYA','LAEL','KIRSTIE','KATHLINE','KASHA','KARLYN','KARIMA','JOVAN','JOSEFINE','JENNELL','JACQUI','JACKELYN','HYO','HIEN','GRAZYNA','FLORRIE','FLORIA','ELEONORA','DWANA','DORLA','DONG','DELMY','DEJA','DEDE','DANN','CRYSTA','CLELIA','CLARIS','CLARENCE','CHIEKO','CHERLYN','CHERELLE','CHARMAIN','CHARA','CAMMY','BEE','ARNETTE','ARDELLE','ANNIKA','AMIEE','AMEE','ALLENA','YVONE','YUKI','YOSHIE','YEVETTE','YAEL','WILLETTA','VONCILE','VENETTA','TULA','TONETTE','TIMIKA','TEMIKA','TELMA','TEISHA','TAREN','TA','STACEE','SHIN','SHAWNTA','SATURNINA','RICARDA','POK','PASTY','ONIE','NUBIA','MORA','MIKE','MARIELLE','MARIELLA','MARIANELA','MARDELL','MANY','LUANNA','LOISE','LISABETH','LINDSY','LILLIANA','LILLIAM','LELAH','LEIGHA','LEANORA','LANG','KRISTEEN','KHALILAH','KEELEY','KANDRA','JUNKO','JOAQUINA','JERLENE','JANI','JAMIKA','JAME','HSIU','HERMILA','GOLDEN','GENEVIVE','EVIA','EUGENA','EMMALINE','ELFREDA','ELENE','DONETTE','DELCIE','DEEANNA','DARCEY','CUC','CLARINDA','CIRA','CHAE','CELINDA','CATHERYN','CATHERIN','CASIMIRA','CARMELIA','CAMELLIA','BREANA','BOBETTE','BERNARDINA','BEBE','BASILIA','ARLYNE','AMAL','ALAYNA','ZONIA','ZENIA','YURIKO','YAEKO','WYNELL','WILLOW','WILLENA','VERNIA','TU','TRAVIS','TORA','TERRILYN','TERICA','TENESHA','TAWNA','TAJUANA','TAINA','STEPHNIE','SONA','SOL','SINA','SHONDRA','SHIZUKO','SHERLENE','SHERICE','SHARIKA','ROSSIE','ROSENA','RORY','RIMA','RIA','RHEBA','RENNA','PETER','NATALYA','NANCEE','MELODI','MEDA','MAXIMA','MATHA','MARKETTA','MARICRUZ','MARCELENE','MALVINA','LUBA','LOUETTA','LEIDA','LECIA','LAURAN','LASHAWNA','LAINE','KHADIJAH','KATERINE','KASI','KALLIE','JULIETTA','JESUSITA','JESTINE','JESSIA','JEREMY','JEFFIE','JANYCE','ISADORA','GEORGIANNE','FIDELIA','EVITA','EURA','EULAH','ESTEFANA','ELSY','ELIZABET','ELADIA','DODIE','DION','DIA','DENISSE','DELORAS','DELILA','DAYSI','DAKOTA','CURTIS','CRYSTLE','CONCHA','COLBY','CLARETTA','CHU','CHRISTIA','CHARLSIE','CHARLENA','CARYLON','BETTYANN','ASLEY','ASHLEA','AMIRA','AI','AGUEDA','AGNUS','YUETTE','VINITA','VICTORINA','TYNISHA','TREENA','TOCCARA','TISH','THOMASENA','TEGAN','SOILA','SHILOH','SHENNA','SHARMAINE','SHANTAE','SHANDI','SEPTEMBER','SARAN','SARAI','SANA','SAMUEL','SALLEY','ROSETTE','ROLANDE','REGINE','OTELIA','OSCAR','OLEVIA','NICHOLLE','NECOLE','NAIDA','MYRTA','MYESHA','MITSUE','MINTA','MERTIE','MARGY','MAHALIA','MADALENE','LOVE','LOURA','LOREAN','LEWIS','LESHA','LEONIDA','LENITA','LAVONE','LASHELL','LASHANDRA','LAMONICA','KIMBRA','KATHERINA','KARRY','KANESHA','JULIO','JONG','JENEVA','JAQUELYN','HWA','GILMA','GHISLAINE','GERTRUDIS','FRANSISCA','FERMINA','ETTIE','ETSUKO','ELLIS','ELLAN','ELIDIA','EDRA','DORETHEA','DOREATHA','DENYSE','DENNY','DEETTA','DAINE','CYRSTAL','CORRIN','CAYLA','CARLITA','CAMILA','BURMA','BULA','BUENA','BLAKE','BARABARA','AVRIL','AUSTIN','ALAINE','ZANA','WILHEMINA','WANETTA','VIRGIL','VI','VERONIKA','VERNON','VERLINE','VASILIKI','TONITA','TISA','TEOFILA','TAYNA','TAUNYA','TANDRA','TAKAKO','SUNNI','SUANNE','SIXTA','SHARELL','SEEMA','RUSSELL','ROSENDA','ROBENA','RAYMONDE','PEI','PAMILA','OZELL','NEIDA','NEELY','MISTIE','MICHA','MERISSA','MAURITA','MARYLN','MARYETTA','MARSHALL','MARCELL','MALENA','MAKEDA','MADDIE','LOVETTA','LOURIE','LORRINE','LORILEE','LESTER','LAURENA','LASHAY','LARRAINE','LAREE','LACRESHA','KRISTLE','KRISHNA','KEVA','KEIRA','KAROLE','JOIE','JINNY','JEANNETTA','JAMA','HEIDY','GILBERTE','GEMA','FAVIOLA','EVELYNN','ENDA','ELLI','ELLENA','DIVINA','DAGNY','COLLENE','CODI','CINDIE','CHASSIDY','CHASIDY','CATRICE','CATHERINA','CASSEY','CAROLL','CARLENA','CANDRA','CALISTA','BRYANNA','BRITTENY','BEULA','BARI','AUDRIE','AUDRIA','ARDELIA','ANNELLE','ANGILA','ALONA','ALLYN','DOUGLAS','ROGER','JONATHAN','RALPH','NICHOLAS','BENJAMIN','BRUCE','HARRY','WAYNE','STEVE','HOWARD','ERNEST','PHILLIP','TODD','CRAIG','ALAN','PHILIP','EARL','DANNY','BRYAN','STANLEY','LEONARD','NATHAN','MANUEL','RODNEY','MARVIN','VINCENT','JEFFERY','JEFF','CHAD','JACOB','ALFRED','BRADLEY','HERBERT','FREDERICK','EDWIN','DON','RICKY','RANDALL','BARRY','BERNARD','LEROY','MARCUS','THEODORE','CLIFFORD','MIGUEL','JIM','TOM','CALVIN','BILL','LLOYD','DEREK','WARREN','DARRELL','JEROME','FLOYD','ALVIN','TIM','GORDON','GREG','JORGE','DUSTIN','PEDRO','DERRICK','ZACHARY','HERMAN','GLEN','HECTOR','RICARDO','RICK','BRENT','RAMON','GILBERT','MARC','REGINALD','RUBEN','NATHANIEL','RAFAEL','EDGAR','MILTON','RAUL','BEN','CHESTER','DUANE','FRANKLIN','BRAD','RON','ROLAND','ARNOLD','HARVEY','JARED','ERIK','DARRYL','NEIL','JAVIER','FERNANDO','CLINTON','TED','MATHEW','TYRONE','DARREN','LANCE','KURT','ALLAN','NELSON','GUY','CLAYTON','HUGH','MAX','DWAYNE','DWIGHT','ARMANDO','FELIX','EVERETT','IAN','WALLACE','KEN','BOB','ALFREDO','ALBERTO','DAVE','IVAN','BYRON','ISAAC','MORRIS','CLIFTON','WILLARD','ROSS','ANDY','SALVADOR','KIRK','SERGIO','SETH','KENT','TERRANCE','EDUARDO','TERRENCE','ENRIQUE','WADE','STUART','FREDRICK','ARTURO','ALEJANDRO','NICK','LUTHER','WENDELL','JEREMIAH','JULIUS','OTIS','TREVOR','OLIVER','LUKE','HOMER','GERARD','DOUG','KENNY','HUBERT','LYLE','MATT','ALFONSO','ORLANDO','REX','CARLTON','ERNESTO','NEAL','PABLO','LORENZO','OMAR','WILBUR','GRANT','HORACE','RODERICK','ABRAHAM','WILLIS','RICKEY','ANDRES','CESAR','JOHNATHAN','MALCOLM','RUDOLPH','DAMON','KELVIN','PRESTON','ALTON','ARCHIE','MARCO','WM','PETE','RANDOLPH','GARRY','GEOFFREY','JONATHON','FELIPE','GERARDO','ED','DOMINIC','DELBERT','COLIN','GUILLERMO','EARNEST','LUCAS','BENNY','SPENCER','RODOLFO','MYRON','EDMUND','GARRETT','SALVATORE','CEDRIC','LOWELL','GREGG','SHERMAN','WILSON','SYLVESTER','ROOSEVELT','ISRAEL','JERMAINE','FORREST','WILBERT','LELAND','SIMON','CLARK','IRVING','BRYANT','OWEN','RUFUS','WOODROW','KRISTOPHER','MACK','LEVI','MARCOS','GUSTAVO','JAKE','LIONEL','GILBERTO','CLINT','NICOLAS','ISMAEL','ORVILLE','ERVIN','DEWEY','AL','WILFRED','JOSH','HUGO','IGNACIO','CALEB','TOMAS','SHELDON','ERICK','STEWART','DOYLE','DARREL','ROGELIO','TERENCE','SANTIAGO','ALONZO','ELIAS','BERT','ELBERT','RAMIRO','CONRAD','NOAH','GRADY','PHIL','CORNELIUS','LAMAR','ROLANDO','CLAY','PERCY','DEXTER','BRADFORD','DARIN','AMOS','MOSES','IRVIN','SAUL','ROMAN','RANDAL','TIMMY','DARRIN','WINSTON','BRENDAN','ABEL','DOMINICK','BOYD','EMILIO','ELIJAH','DOMINGO','EMMETT','MARLON','EMANUEL','JERALD','EDMOND','EMIL','DEWAYNE','WILL','OTTO','TEDDY','REYNALDO','BRET','JESS','TRENT','HUMBERTO','EMMANUEL','STEPHAN','VICENTE','LAMONT','GARLAND','MILES','EFRAIN','HEATH','RODGER','HARLEY','ETHAN','ELDON','ROCKY','PIERRE','JUNIOR','FREDDY','ELI','BRYCE','ANTOINE','STERLING','CHASE','GROVER','ELTON','CLEVELAND','DYLAN','CHUCK','DAMIAN','REUBEN','STAN','AUGUST','LEONARDO','JASPER','RUSSEL','ERWIN','BENITO','HANS','MONTE','BLAINE','ERNIE','CURT','QUENTIN','AGUSTIN','MURRAY','JAMAL','ADOLFO','HARRISON','TYSON','BURTON','BRADY','ELLIOTT','WILFREDO','BART','JARROD','VANCE','DENIS','DAMIEN','JOAQUIN','HARLAN','DESMOND','ELLIOT','DARWIN','GREGORIO','BUDDY','XAVIER','KERMIT','ROSCOE','ESTEBAN','ANTON','SOLOMON','SCOTTY','NORBERT','ELVIN','WILLIAMS','NOLAN','ROD','QUINTON','HAL','BRAIN','ROB','ELWOOD','KENDRICK','DARIUS','MOISES','FIDEL','THADDEUS','CLIFF','MARCEL','JACKSON','RAPHAEL','BRYON','ARMAND','ALVARO','JEFFRY','DANE','JOESPH','THURMAN','NED','RUSTY','MONTY','FABIAN','REGGIE','MASON','GRAHAM','ISAIAH','VAUGHN','GUS','LOYD','DIEGO','ADOLPH','NORRIS','MILLARD','ROCCO','GONZALO','DERICK','RODRIGO','WILEY','RIGOBERTO','ALPHONSO','TY','NOE','VERN','REED','JEFFERSON','ELVIS','BERNARDO','MAURICIO','HIRAM','DONOVAN','BASIL','RILEY','NICKOLAS','MAYNARD','SCOT','VINCE','QUINCY','EDDY','SEBASTIAN','FEDERICO','ULYSSES','HERIBERTO','DONNELL','COLE','DAVIS','GAVIN','EMERY','WARD','ROMEO','JAYSON','DANTE','CLEMENT','COY','MAXWELL','JARVIS','BRUNO','ISSAC','DUDLEY','BROCK','SANFORD','CARMELO','BARNEY','NESTOR','STEFAN','DONNY','ART','LINWOOD','BEAU','WELDON','GALEN','ISIDRO','TRUMAN','DELMAR','JOHNATHON','SILAS','FREDERIC','DICK','IRWIN','MERLIN','CHARLEY','MARCELINO','HARRIS','CARLO','TRENTON','KURTIS','HUNTER','AURELIO','WINFRED','VITO','COLLIN','DENVER','CARTER','LEONEL','EMORY','PASQUALE','MOHAMMAD','MARIANO','DANIAL','LANDON','DIRK','BRANDEN','ADAN','BUFORD','GERMAN','WILMER','EMERSON','ZACHERY','FLETCHER','JACQUES','ERROL','DALTON','MONROE','JOSUE','EDWARDO','BOOKER','WILFORD','SONNY','SHELTON','CARSON','THERON','RAYMUNDO','DAREN','HOUSTON','ROBBY','LINCOLN','GENARO','BENNETT','OCTAVIO','CORNELL','HUNG','ARRON','ANTONY','HERSCHEL','GIOVANNI','GARTH','CYRUS','CYRIL','RONNY','LON','FREEMAN','DUNCAN','KENNITH','CARMINE','ERICH','CHADWICK','WILBURN','RUSS','REID','MYLES','ANDERSON','MORTON','JONAS','FOREST','MITCHEL','MERVIN','ZANE','RICH','JAMEL','LAZARO','ALPHONSE','RANDELL','MAJOR','JARRETT','BROOKS','ABDUL','LUCIANO','SEYMOUR','EUGENIO','MOHAMMED','VALENTIN','CHANCE','ARNULFO','LUCIEN','FERDINAND','THAD','EZRA','ALDO','RUBIN','ROYAL','MITCH','EARLE','ABE','WYATT','MARQUIS','LANNY','KAREEM','JAMAR','BORIS','ISIAH','EMILE','ELMO','ARON','LEOPOLDO','EVERETTE','JOSEF','ELOY','RODRICK','REINALDO','LUCIO','JERROD','WESTON','HERSHEL','BARTON','PARKER','LEMUEL','BURT','JULES','GIL','ELISEO','AHMAD','NIGEL','EFREN','ANTWAN','ALDEN','MARGARITO','COLEMAN','DINO','OSVALDO','LES','DEANDRE','NORMAND','KIETH','TREY','NORBERTO','NAPOLEON','JEROLD','FRITZ','ROSENDO','MILFORD','CHRISTOPER','ALFONZO','LYMAN','JOSIAH','BRANT','WILTON','RICO','JAMAAL','DEWITT','BRENTON','OLIN','FOSTER','FAUSTINO','CLAUDIO','JUDSON','GINO','EDGARDO','ALEC','TANNER','JARRED','DONN','TAD','PRINCE','PORFIRIO','ODIS','LENARD','CHAUNCEY','TOD','MEL','MARCELO','KORY','AUGUSTUS','KEVEN','HILARIO','BUD','SAL','ORVAL','MAURO','ZACHARIAH','OLEN','ANIBAL','MILO','JED','DILLON','AMADO','NEWTON','LENNY','RICHIE','HORACIO','BRICE','MOHAMED','DELMER','DARIO','REYES','MAC','JONAH','JERROLD','ROBT','HANK','RUPERT','ROLLAND','KENTON','DAMION','ANTONE','WALDO','FREDRIC','BRADLY','KIP','BURL','WALKER','TYREE','JEFFEREY','AHMED','WILLY','STANFORD','OREN','NOBLE','MOSHE','MIKEL','ENOCH','BRENDON','QUINTIN','JAMISON','FLORENCIO','DARRICK','TOBIAS','HASSAN','GIUSEPPE','DEMARCUS','CLETUS','TYRELL','LYNDON','KEENAN','WERNER','GERALDO','COLUMBUS','CHET','BERTRAM','MARKUS','HUEY','HILTON','DWAIN','DONTE','TYRON','OMER','ISAIAS','HIPOLITO','FERMIN','ADALBERTO','BO','BARRETT','TEODORO','MCKINLEY','MAXIMO','GARFIELD','RALEIGH','LAWERENCE','ABRAM','RASHAD','KING','EMMITT','DARON','SAMUAL','MIQUEL','EUSEBIO','DOMENIC','DARRON','BUSTER','WILBER','RENATO','JC','HOYT','HAYWOOD','EZEKIEL','CHAS','FLORENTINO','ELROY','CLEMENTE','ARDEN','NEVILLE','EDISON','DESHAWN','NATHANIAL','JORDON','DANILO','CLAUD','SHERWOOD','RAYMON','RAYFORD','CRISTOBAL','AMBROSE','TITUS','HYMAN','FELTON','EZEQUIEL','ERASMO','STANTON','LONNY','LEN','IKE','MILAN','LINO','JAROD','HERB','ANDREAS','WALTON','RHETT','PALMER','DOUGLASS','CORDELL','OSWALDO','ELLSWORTH','VIRGILIO','TONEY','NATHANAEL','DEL','BENEDICT','MOSE','JOHNSON','ISREAL','GARRET','FAUSTO','ASA','ARLEN','ZACK','WARNER','MODESTO','FRANCESCO','MANUAL','GAYLORD','GASTON','FILIBERTO','DEANGELO','MICHALE','GRANVILLE','WES','MALIK','ZACKARY','TUAN','ELDRIDGE','CRISTOPHER','CORTEZ','ANTIONE','MALCOM','LONG','KOREY','JOSPEH','COLTON','WAYLON','VON','HOSEA','SHAD','SANTO','RUDOLF','ROLF','REY','RENALDO','MARCELLUS','LUCIUS','KRISTOFER','BOYCE','BENTON','HAYDEN','HARLAND','ARNOLDO','RUEBEN','LEANDRO','KRAIG','JERRELL','JEROMY','HOBERT','CEDRICK','ARLIE','WINFORD','WALLY','LUIGI','KENETH','JACINTO','GRAIG','FRANKLYN','EDMUNDO','SID','PORTER','LEIF','JERAMY','BUCK','WILLIAN','VINCENZO','SHON','LYNWOOD','JERE','HAI','ELDEN','DORSEY','DARELL','BRODERICK','ALONSO'];", - "tail": "" + "head": [ + "const names = ['MARY','PATRICIA','LINDA','BARBARA','ELIZABETH','JENNIFER','MARIA','SUSAN','MARGARET','DOROTHY','LISA','NANCY','KAREN','BETTY','HELEN','SANDRA','DONNA','CAROL','RUTH','SHARON','MICHELLE','LAURA','SARAH','KIMBERLY','DEBORAH','JESSICA','SHIRLEY','CYNTHIA','ANGELA','MELISSA','BRENDA','AMY','ANNA','REBECCA','VIRGINIA','KATHLEEN','PAMELA','MARTHA','DEBRA','AMANDA','STEPHANIE','CAROLYN','CHRISTINE','MARIE','JANET','CATHERINE','FRANCES','ANN','JOYCE','DIANE','ALICE','JULIE','HEATHER','TERESA','DORIS','GLORIA','EVELYN','JEAN','CHERYL','MILDRED','KATHERINE','JOAN','ASHLEY','JUDITH','ROSE','JANICE','KELLY','NICOLE','JUDY','CHRISTINA','KATHY','THERESA','BEVERLY','DENISE','TAMMY','IRENE','JANE','LORI','RACHEL','MARILYN','ANDREA','KATHRYN','LOUISE','SARA','ANNE','JACQUELINE','WANDA','BONNIE','JULIA','RUBY','LOIS','TINA','PHYLLIS','NORMA','PAULA','DIANA','ANNIE','LILLIAN','EMILY','ROBIN','PEGGY','CRYSTAL','GLADYS','RITA','DAWN','CONNIE','FLORENCE','TRACY','EDNA','TIFFANY','CARMEN','ROSA','CINDY','GRACE','WENDY','VICTORIA','EDITH','KIM','SHERRY','SYLVIA','JOSEPHINE','THELMA','SHANNON','SHEILA','ETHEL','ELLEN','ELAINE','MARJORIE','CARRIE','CHARLOTTE','MONICA','ESTHER','PAULINE','EMMA','JUANITA','ANITA','RHONDA','HAZEL','AMBER','EVA','DEBBIE','APRIL','LESLIE','CLARA','LUCILLE','JAMIE','JOANNE','ELEANOR','VALERIE','DANIELLE','MEGAN','ALICIA','SUZANNE','MICHELE','GAIL','BERTHA','DARLENE','VERONICA','JILL','ERIN','GERALDINE','LAUREN','CATHY','JOANN','LORRAINE','LYNN','SALLY','REGINA','ERICA','BEATRICE','DOLORES','BERNICE','AUDREY','YVONNE','ANNETTE','JUNE','SAMANTHA','MARION','DANA','STACY','ANA','RENEE','IDA','VIVIAN','ROBERTA','HOLLY','BRITTANY','MELANIE','LORETTA','YOLANDA','JEANETTE','LAURIE','KATIE','KRISTEN','VANESSA','ALMA','SUE','ELSIE','BETH','JEANNE','VICKI','CARLA','TARA','ROSEMARY','EILEEN','TERRI','GERTRUDE','LUCY','TONYA','ELLA','STACEY','WILMA','GINA','KRISTIN','JESSIE','NATALIE','AGNES','VERA','WILLIE','CHARLENE','BESSIE','DELORES','MELINDA','PEARL','ARLENE','MAUREEN','COLLEEN','ALLISON','TAMARA','JOY','GEORGIA','CONSTANCE','LILLIE','CLAUDIA','JACKIE','MARCIA','TANYA','NELLIE','MINNIE','MARLENE','HEIDI','GLENDA','LYDIA','VIOLA','COURTNEY','MARIAN','STELLA','CAROLINE','DORA','JO','VICKIE','MATTIE','TERRY','MAXINE','IRMA','MABEL','MARSHA','MYRTLE','LENA','CHRISTY','DEANNA','PATSY','HILDA','GWENDOLYN','JENNIE','NORA','MARGIE','NINA','CASSANDRA','LEAH','PENNY','KAY','PRISCILLA','NAOMI','CAROLE','BRANDY','OLGA','BILLIE','DIANNE','TRACEY','LEONA','JENNY','FELICIA','SONIA','MIRIAM','VELMA','BECKY','BOBBIE','VIOLET','KRISTINA','TONI','MISTY','MAE','SHELLY','DAISY','RAMONA','SHERRI','ERIKA','KATRINA','CLAIRE','LINDSEY','LINDSAY','GENEVA','GUADALUPE','BELINDA','MARGARITA','SHERYL','CORA','FAYE','ADA','NATASHA','SABRINA','ISABEL','MARGUERITE','HATTIE','HARRIET','MOLLY','CECILIA','KRISTI','BRANDI','BLANCHE','SANDY','ROSIE','JOANNA','IRIS','EUNICE','ANGIE','INEZ','LYNDA','MADELINE','AMELIA','ALBERTA','GENEVIEVE','MONIQUE','JODI','JANIE','MAGGIE','KAYLA','SONYA','JAN','LEE','KRISTINE','CANDACE','FANNIE','MARYANN','OPAL','ALISON','YVETTE','MELODY','LUZ','SUSIE','OLIVIA','FLORA','SHELLEY','KRISTY','MAMIE','LULA','LOLA','VERNA','BEULAH','ANTOINETTE','CANDICE','JUANA','JEANNETTE','PAM','KELLI','HANNAH','WHITNEY','BRIDGET','KARLA','CELIA','LATOYA','PATTY','SHELIA','GAYLE','DELLA','VICKY','LYNNE','SHERI','MARIANNE','KARA','JACQUELYN','ERMA','BLANCA','MYRA','LETICIA','PAT','KRISTA','ROXANNE','ANGELICA','JOHNNIE','ROBYN','FRANCIS','ADRIENNE','ROSALIE','ALEXANDRA','BROOKE','BETHANY','SADIE','BERNADETTE','TRACI','JODY','KENDRA','JASMINE','NICHOLE','RACHAEL','CHELSEA','MABLE','ERNESTINE','MURIEL','MARCELLA','ELENA','KRYSTAL','ANGELINA','NADINE','KARI','ESTELLE','DIANNA','PAULETTE','LORA','MONA','DOREEN','ROSEMARIE','ANGEL','DESIREE','ANTONIA','HOPE','GINGER','JANIS','BETSY','CHRISTIE','FREDA','MERCEDES','MEREDITH','LYNETTE','TERI','CRISTINA','EULA','LEIGH','MEGHAN','SOPHIA','ELOISE','ROCHELLE','GRETCHEN','CECELIA','RAQUEL','HENRIETTA','ALYSSA','JANA','KELLEY','GWEN','KERRY','JENNA','TRICIA','LAVERNE','OLIVE','ALEXIS','TASHA','SILVIA','ELVIRA','CASEY','DELIA','SOPHIE','KATE','PATTI','LORENA','KELLIE','SONJA','LILA','LANA','DARLA','MAY','MINDY','ESSIE','MANDY','LORENE','ELSA','JOSEFINA','JEANNIE','MIRANDA','DIXIE','LUCIA','MARTA','FAITH','LELA','JOHANNA','SHARI','CAMILLE','TAMI','SHAWNA','ELISA','EBONY','MELBA','ORA','NETTIE','TABITHA','OLLIE','JAIME','WINIFRED','KRISTIE','MARINA','ALISHA','AIMEE','RENA','MYRNA','MARLA','TAMMIE','LATASHA','BONITA','PATRICE','RONDA','SHERRIE','ADDIE','FRANCINE','DELORIS','STACIE','ADRIANA','CHERI','SHELBY','ABIGAIL','CELESTE','JEWEL','CARA','ADELE','REBEKAH','LUCINDA','DORTHY','CHRIS','EFFIE','TRINA','REBA','SHAWN','SALLIE','AURORA','LENORA','ETTA','LOTTIE','KERRI','TRISHA','NIKKI','ESTELLA','FRANCISCA','JOSIE','TRACIE','MARISSA','KARIN','BRITTNEY','JANELLE','LOURDES','LAUREL','HELENE','FERN','ELVA','CORINNE','KELSEY','INA','BETTIE','ELISABETH','AIDA','CAITLIN','INGRID','IVA','EUGENIA','CHRISTA','GOLDIE','CASSIE','MAUDE','JENIFER','THERESE','FRANKIE','DENA','LORNA','JANETTE','LATONYA','CANDY','MORGAN','CONSUELO','TAMIKA','ROSETTA','DEBORA','CHERIE','POLLY','DINA','JEWELL','FAY','JILLIAN','DOROTHEA','NELL','TRUDY','ESPERANZA','PATRICA','KIMBERLEY','SHANNA','HELENA','CAROLINA','CLEO','STEFANIE','ROSARIO','OLA','JANINE','MOLLIE','LUPE','ALISA','LOU','MARIBEL','SUSANNE','BETTE','SUSANA','ELISE','CECILE','ISABELLE','LESLEY','JOCELYN','PAIGE','JONI','RACHELLE','LEOLA','DAPHNE','ALTA','ESTER','PETRA','GRACIELA','IMOGENE','JOLENE','KEISHA','LACEY','GLENNA','GABRIELA','KERI','URSULA','LIZZIE','KIRSTEN','SHANA','ADELINE','MAYRA','JAYNE','JACLYN','GRACIE','SONDRA','CARMELA','MARISA','ROSALIND','CHARITY','TONIA','BEATRIZ','MARISOL','CLARICE','JEANINE','SHEENA','ANGELINE','FRIEDA','LILY','ROBBIE','SHAUNA','MILLIE','CLAUDETTE','CATHLEEN','ANGELIA','GABRIELLE','AUTUMN','KATHARINE','SUMMER','JODIE','STACI','LEA','CHRISTI','JIMMIE','JUSTINE','ELMA','LUELLA','MARGRET','DOMINIQUE','SOCORRO','RENE','MARTINA','MARGO','MAVIS','CALLIE','BOBBI','MARITZA','LUCILE','LEANNE','JEANNINE','DEANA','AILEEN','LORIE','LADONNA','WILLA','MANUELA','GALE','SELMA','DOLLY','SYBIL','ABBY','LARA','DALE','IVY','DEE','WINNIE','MARCY','LUISA','JERI','MAGDALENA','OFELIA','MEAGAN','AUDRA','MATILDA','LEILA','CORNELIA','BIANCA','SIMONE','BETTYE','RANDI','VIRGIE','LATISHA','BARBRA','GEORGINA','ELIZA','LEANN','BRIDGETTE','RHODA','HALEY','ADELA','NOLA','BERNADINE','FLOSSIE','ILA','GRETA','RUTHIE','NELDA','MINERVA','LILLY','TERRIE','LETHA','HILARY','ESTELA','VALARIE','BRIANNA','ROSALYN','EARLINE','CATALINA','AVA','MIA','CLARISSA','LIDIA','CORRINE','ALEXANDRIA','CONCEPCION','TIA','SHARRON','RAE','DONA','ERICKA','JAMI','ELNORA','CHANDRA','LENORE','NEVA','MARYLOU','MELISA','TABATHA','SERENA','AVIS','ALLIE','SOFIA','JEANIE','ODESSA','NANNIE','HARRIETT','LORAINE','PENELOPE','MILAGROS','EMILIA','BENITA','ALLYSON','ASHLEE','TANIA','TOMMIE','ESMERALDA','KARINA','EVE','PEARLIE','ZELMA','MALINDA','NOREEN','TAMEKA','SAUNDRA','HILLARY','AMIE','ALTHEA','ROSALINDA','JORDAN','LILIA','ALANA','GAY','CLARE','ALEJANDRA','ELINOR','MICHAEL','LORRIE','JERRI','DARCY','EARNESTINE','CARMELLA','TAYLOR','NOEMI','MARCIE','LIZA','ANNABELLE','LOUISA','EARLENE','MALLORY','CARLENE','NITA','SELENA','TANISHA','KATY','JULIANNE','JOHN','LAKISHA','EDWINA','MARICELA','MARGERY','KENYA','DOLLIE','ROXIE','ROSLYN','KATHRINE','NANETTE','CHARMAINE','LAVONNE','ILENE','KRIS','TAMMI','SUZETTE','CORINE','KAYE','JERRY','MERLE','CHRYSTAL','LINA','DEANNE','LILIAN','JULIANA','ALINE','LUANN','KASEY','MARYANNE','EVANGELINE','COLETTE','MELVA','LAWANDA','YESENIA','NADIA','MADGE','KATHIE','EDDIE','OPHELIA','VALERIA','NONA','MITZI','MARI','GEORGETTE','CLAUDINE','FRAN','ALISSA','ROSEANN','LAKEISHA','SUSANNA','REVA','DEIDRE','CHASITY','SHEREE','CARLY','JAMES','ELVIA','ALYCE','DEIRDRE','GENA','BRIANA','ARACELI','KATELYN','ROSANNE','WENDI','TESSA','BERTA','MARVA','IMELDA','MARIETTA','MARCI','LEONOR','ARLINE','SASHA','MADELYN','JANNA','JULIETTE','DEENA','AURELIA','JOSEFA','AUGUSTA','LILIANA','YOUNG','CHRISTIAN','LESSIE','AMALIA','SAVANNAH','ANASTASIA','VILMA','NATALIA','ROSELLA','LYNNETTE','CORINA','ALFREDA','LEANNA','CAREY','AMPARO','COLEEN','TAMRA','AISHA','WILDA','KARYN','CHERRY','QUEEN','MAURA','MAI','EVANGELINA','ROSANNA','HALLIE','ERNA','ENID','MARIANA','LACY','JULIET','JACKLYN','FREIDA','MADELEINE','MARA','HESTER','CATHRYN','LELIA','CASANDRA','BRIDGETT','ANGELITA','JANNIE','DIONNE','ANNMARIE','KATINA','BERYL','PHOEBE','MILLICENT','KATHERYN','DIANN','CARISSA','MARYELLEN','LIZ','LAURI','HELGA','GILDA','ADRIAN','RHEA','MARQUITA','HOLLIE','TISHA','TAMERA','ANGELIQUE','FRANCESCA','BRITNEY','KAITLIN','LOLITA','FLORINE','ROWENA','REYNA','TWILA','FANNY','JANELL','INES','CONCETTA','BERTIE','ALBA','BRIGITTE','ALYSON','VONDA','PANSY','ELBA','NOELLE','LETITIA','KITTY','DEANN','BRANDIE','LOUELLA','LETA','FELECIA','SHARLENE','LESA','BEVERLEY','ROBERT','ISABELLA','HERMINIA','TERRA','CELINA','TORI','OCTAVIA','JADE','DENICE','GERMAINE','SIERRA','MICHELL','CORTNEY','NELLY','DORETHA','SYDNEY','DEIDRA','MONIKA','LASHONDA','JUDI','CHELSEY','ANTIONETTE','MARGOT','BOBBY','ADELAIDE','NAN','LEEANN','ELISHA','DESSIE','LIBBY','KATHI','GAYLA','LATANYA','MINA','MELLISA','KIMBERLEE','JASMIN','RENAE','ZELDA','ELDA','MA','JUSTINA','GUSSIE','EMILIE','CAMILLA','ABBIE','ROCIO','KAITLYN','JESSE','EDYTHE','ASHLEIGH','SELINA','LAKESHA','GERI','ALLENE','PAMALA','MICHAELA','DAYNA','CARYN','ROSALIA','SUN','JACQULINE','REBECA','MARYBETH','KRYSTLE','IOLA','DOTTIE','BENNIE','BELLE','AUBREY','GRISELDA','ERNESTINA','ELIDA','ADRIANNE','DEMETRIA','DELMA','CHONG','JAQUELINE','DESTINY','ARLEEN','VIRGINA','RETHA','FATIMA','TILLIE','ELEANORE','CARI','TREVA','BIRDIE','WILHELMINA','ROSALEE','MAURINE','LATRICE','YONG','JENA','TARYN','ELIA','DEBBY','MAUDIE','JEANNA','DELILAH','CATRINA','SHONDA','HORTENCIA','THEODORA','TERESITA','ROBBIN','DANETTE','MARYJANE','FREDDIE','DELPHINE','BRIANNE','NILDA','DANNA','CINDI','BESS','IONA','HANNA','ARIEL','WINONA','VIDA','ROSITA','MARIANNA','WILLIAM','RACHEAL','GUILLERMINA','ELOISA','CELESTINE','CAREN','MALISSA','LONA','CHANTEL','SHELLIE','MARISELA','LEORA','AGATHA','SOLEDAD','MIGDALIA','IVETTE','CHRISTEN','ATHENA','JANEL','CHLOE','VEDA','PATTIE','TESSIE','TERA','MARILYNN','LUCRETIA','KARRIE','DINAH','DANIELA','ALECIA','ADELINA','VERNICE','SHIELA','PORTIA','MERRY','LASHAWN','DEVON','DARA','TAWANA','OMA','VERDA','CHRISTIN','ALENE','ZELLA','SANDI','RAFAELA','MAYA','KIRA','CANDIDA','ALVINA','SUZAN','SHAYLA','LYN','LETTIE','ALVA','SAMATHA','ORALIA','MATILDE','MADONNA','LARISSA','VESTA','RENITA','INDIA','DELOIS','SHANDA','PHILLIS','LORRI','ERLINDA','CRUZ','CATHRINE','BARB','ZOE','ISABELL','IONE','GISELA','CHARLIE','VALENCIA','ROXANNA','MAYME','KISHA','ELLIE','MELLISSA','DORRIS','DALIA','BELLA','ANNETTA','ZOILA','RETA','REINA','LAURETTA','KYLIE','CHRISTAL','PILAR','CHARLA','ELISSA','TIFFANI','TANA','PAULINA','LEOTA','BREANNA','JAYME','CARMEL','VERNELL','TOMASA','MANDI','DOMINGA','SANTA','MELODIE','LURA','ALEXA','TAMELA','RYAN','MIRNA','KERRIE','VENUS','NOEL','FELICITA','CRISTY','CARMELITA','BERNIECE','ANNEMARIE','TIARA','ROSEANNE','MISSY','CORI','ROXANA','PRICILLA','KRISTAL','JUNG','ELYSE','HAYDEE','ALETHA','BETTINA','MARGE','GILLIAN','FILOMENA','CHARLES','ZENAIDA','HARRIETTE','CARIDAD','VADA','UNA','ARETHA','PEARLINE','MARJORY','MARCELA','FLOR','EVETTE','ELOUISE','ALINA','TRINIDAD','DAVID','DAMARIS','CATHARINE','CARROLL','BELVA','NAKIA','MARLENA','LUANNE','LORINE','KARON','DORENE','DANITA','BRENNA','TATIANA','SAMMIE','LOUANN','LOREN','JULIANNA','ANDRIA','PHILOMENA','LUCILA','LEONORA','DOVIE','ROMONA','MIMI','JACQUELIN','GAYE','TONJA','MISTI','JOE','GENE','CHASTITY','STACIA','ROXANN','MICAELA','NIKITA','MEI','VELDA','MARLYS','JOHNNA','AURA','LAVERN','IVONNE','HAYLEY','NICKI','MAJORIE','HERLINDA','GEORGE','ALPHA','YADIRA','PERLA','GREGORIA','DANIEL','ANTONETTE','SHELLI','MOZELLE','MARIAH','JOELLE','CORDELIA','JOSETTE','CHIQUITA','TRISTA','LOUIS','LAQUITA','GEORGIANA','CANDI','SHANON','LONNIE','HILDEGARD','CECIL','VALENTINA','STEPHANY','MAGDA','KAROL','GERRY','GABRIELLA','TIANA','ROMA','RICHELLE','RAY','PRINCESS','OLETA','JACQUE','IDELLA','ALAINA','SUZANNA','JOVITA','BLAIR','TOSHA','RAVEN','NEREIDA','MARLYN','KYLA','JOSEPH','DELFINA','TENA','STEPHENIE','SABINA','NATHALIE','MARCELLE','GERTIE','DARLEEN','THEA','SHARONDA','SHANTEL','BELEN','VENESSA','ROSALINA','ONA','GENOVEVA','COREY','CLEMENTINE','ROSALBA','RENATE','RENATA','MI','IVORY','GEORGIANNA','FLOY','DORCAS','ARIANA','TYRA','THEDA','MARIAM','JULI','JESICA','DONNIE','VIKKI','VERLA','ROSELYN','MELVINA','JANNETTE','GINNY','DEBRAH','CORRIE','ASIA','VIOLETA','MYRTIS','LATRICIA','COLLETTE','CHARLEEN','ANISSA','VIVIANA','TWYLA','PRECIOUS','NEDRA','LATONIA','LAN','HELLEN','FABIOLA','ANNAMARIE','ADELL','SHARYN','CHANTAL','NIKI','MAUD','LIZETTE','LINDY','KIA','KESHA','JEANA','DANELLE','CHARLINE','CHANEL','CARROL','VALORIE','LIA','DORTHA','CRISTAL','SUNNY','LEONE','LEILANI','GERRI','DEBI','ANDRA','KESHIA','IMA','EULALIA','EASTER','DULCE','NATIVIDAD','LINNIE','KAMI','GEORGIE','CATINA','BROOK','ALDA','WINNIFRED','SHARLA','RUTHANN','MEAGHAN','MAGDALENE','LISSETTE','ADELAIDA','VENITA','TRENA','SHIRLENE','SHAMEKA','ELIZEBETH','DIAN','SHANTA','MICKEY','LATOSHA','CARLOTTA','WINDY','SOON','ROSINA','MARIANN','LEISA','JONNIE','DAWNA','CATHIE','BILLY','ASTRID','SIDNEY','LAUREEN','JANEEN','HOLLI','FAWN','VICKEY','TERESSA','SHANTE','RUBYE','MARCELINA','CHANDA','CARY','TERESE','SCARLETT','MARTY','MARNIE','LULU','LISETTE','JENIFFER','ELENOR','DORINDA','DONITA','CARMAN','BERNITA','ALTAGRACIA','ALETA','ADRIANNA','ZORAIDA','RONNIE','NICOLA','LYNDSEY','KENDALL','JANINA','CHRISSY','AMI','STARLA','PHYLIS','PHUONG','KYRA','CHARISSE','BLANCH','SANJUANITA','RONA','NANCI','MARILEE','MARANDA','CORY','BRIGETTE','SANJUANA','MARITA','KASSANDRA','JOYCELYN','IRA','FELIPA','CHELSIE','BONNY','MIREYA','LORENZA','KYONG','ILEANA','CANDELARIA','TONY','TOBY','SHERIE','OK','MARK','LUCIE','LEATRICE','LAKESHIA','GERDA','EDIE','BAMBI','MARYLIN','LAVON','HORTENSE','GARNET','EVIE','TRESSA','SHAYNA','LAVINA','KYUNG','JEANETTA','SHERRILL','SHARA','PHYLISS','MITTIE','ANABEL','ALESIA','THUY','TAWANDA','RICHARD','JOANIE','TIFFANIE','LASHANDA','KARISSA','ENRIQUETA','DARIA','DANIELLA','CORINNA','ALANNA','ABBEY','ROXANE','ROSEANNA','MAGNOLIA','LIDA','KYLE','JOELLEN','ERA','CORAL','CARLEEN','TRESA','PEGGIE','NOVELLA','NILA','MAYBELLE','JENELLE','CARINA','NOVA','MELINA','MARQUERITE','MARGARETTE','JOSEPHINA','EVONNE','DEVIN','CINTHIA','ALBINA','TOYA','TAWNYA','SHERITA','SANTOS','MYRIAM','LIZABETH','LISE','KEELY','JENNI','GISELLE','CHERYLE','ARDITH','ARDIS','ALESHA','ADRIANE','SHAINA','LINNEA','KAROLYN','HONG','FLORIDA','FELISHA','DORI','DARCI','ARTIE','ARMIDA','ZOLA','XIOMARA','VERGIE','SHAMIKA','NENA','NANNETTE','MAXIE','LOVIE','JEANE','JAIMIE','INGE','FARRAH','ELAINA','CAITLYN','STARR','FELICITAS','CHERLY','CARYL','YOLONDA','YASMIN','TEENA','PRUDENCE','PENNIE','NYDIA','MACKENZIE','ORPHA','MARVEL','LIZBETH','LAURETTE','JERRIE','HERMELINDA','CAROLEE','TIERRA','MIRIAN','META','MELONY','KORI','JENNETTE','JAMILA','ENA','ANH','YOSHIKO','SUSANNAH','SALINA','RHIANNON','JOLEEN','CRISTINE','ASHTON','ARACELY','TOMEKA','SHALONDA','MARTI','LACIE','KALA','JADA','ILSE','HAILEY','BRITTANI','ZONA','SYBLE','SHERRYL','RANDY','NIDIA','MARLO','KANDICE','KANDI','DEB','DEAN','AMERICA','ALYCIA','TOMMY','RONNA','NORENE','MERCY','JOSE','INGEBORG','GIOVANNA','GEMMA','CHRISTEL','AUDRY','ZORA','VITA','VAN','TRISH','STEPHAINE','SHIRLEE','SHANIKA','MELONIE','MAZIE','JAZMIN','INGA','HOA','HETTIE','GERALYN','FONDA','ESTRELLA','ADELLA','SU','SARITA','RINA','MILISSA','MARIBETH','GOLDA','EVON','ETHELYN','ENEDINA','CHERISE','CHANA','VELVA','TAWANNA','SADE','MIRTA','LI','KARIE','JACINTA','ELNA','DAVINA','CIERRA','ASHLIE','ALBERTHA','TANESHA','STEPHANI','NELLE','MINDI','LU','LORINDA','LARUE','FLORENE','DEMETRA','DEDRA','CIARA','CHANTELLE','ASHLY','SUZY','ROSALVA','NOELIA','LYDA','LEATHA','KRYSTYNA','KRISTAN','KARRI','DARLINE','DARCIE','CINDA','CHEYENNE','CHERRIE','AWILDA','ALMEDA','ROLANDA','LANETTE','JERILYN','GISELE','EVALYN','CYNDI','CLETA','CARIN','ZINA','ZENA','VELIA','TANIKA','PAUL','CHARISSA','THOMAS','TALIA','MARGARETE','LAVONDA','KAYLEE','KATHLENE','JONNA','IRENA','ILONA','IDALIA','CANDIS','CANDANCE','BRANDEE','ANITRA','ALIDA','SIGRID','NICOLETTE','MARYJO','LINETTE','HEDWIG','CHRISTIANA','CASSIDY','ALEXIA','TRESSIE','MODESTA','LUPITA','LITA','GLADIS','EVELIA','DAVIDA','CHERRI','CECILY','ASHELY','ANNABEL','AGUSTINA','WANITA','SHIRLY','ROSAURA','HULDA','EUN','BAILEY','YETTA','VERONA','THOMASINA','SIBYL','SHANNAN','MECHELLE','LUE','LEANDRA','LANI','KYLEE','KANDY','JOLYNN','FERNE','EBONI','CORENE','ALYSIA','ZULA','NADA','MOIRA','LYNDSAY','LORRETTA','JUAN','JAMMIE','HORTENSIA','GAYNELL','CAMERON','ADRIA','VINA','VICENTA','TANGELA','STEPHINE','NORINE','NELLA','LIANA','LESLEE','KIMBERELY','ILIANA','GLORY','FELICA','EMOGENE','ELFRIEDE','EDEN','EARTHA','CARMA','BEA','OCIE','MARRY','LENNIE','KIARA','JACALYN','CARLOTA','ARIELLE','YU','STAR','OTILIA','KIRSTIN','KACEY','JOHNETTA','JOEY','JOETTA','JERALDINE','JAUNITA','ELANA','DORTHEA','CAMI','AMADA','ADELIA','VERNITA','TAMAR','SIOBHAN','RENEA','RASHIDA','OUIDA','ODELL','NILSA','MERYL','KRISTYN','JULIETA','DANICA','BREANNE','AUREA','ANGLEA','SHERRON','ODETTE','MALIA','LORELEI','LIN','LEESA','KENNA','KATHLYN','FIONA','CHARLETTE','SUZIE','SHANTELL','SABRA','RACQUEL','MYONG','MIRA','MARTINE','LUCIENNE','LAVADA','JULIANN','JOHNIE','ELVERA','DELPHIA','CLAIR','CHRISTIANE','CHAROLETTE','CARRI','AUGUSTINE','ASHA','ANGELLA','PAOLA','NINFA','LEDA','LAI','EDA','SUNSHINE','STEFANI','SHANELL','PALMA','MACHELLE','LISSA','KECIA','KATHRYNE','KARLENE','JULISSA','JETTIE','JENNIFFER','HUI','CORRINA','CHRISTOPHER','CAROLANN','ALENA','TESS','ROSARIA','MYRTICE','MARYLEE','LIANE','KENYATTA','JUDIE','JANEY','IN','ELMIRA','ELDORA','DENNA','CRISTI','CATHI','ZAIDA','VONNIE','VIVA','VERNIE','ROSALINE','MARIELA','LUCIANA','LESLI','KARAN','FELICE','DENEEN','ADINA','WYNONA','TARSHA','SHERON','SHASTA','SHANITA','SHANI','SHANDRA','RANDA','PINKIE','PARIS','NELIDA','MARILOU','LYLA','LAURENE','LACI','JOI','JANENE','DOROTHA','DANIELE','DANI','CAROLYNN','CARLYN','BERENICE','AYESHA','ANNELIESE','ALETHEA','THERSA','TAMIKO','RUFINA','OLIVA','MOZELL','MARYLYN','MADISON','KRISTIAN','KATHYRN','KASANDRA','KANDACE','JANAE','GABRIEL','DOMENICA','DEBBRA','DANNIELLE','CHUN','BUFFY','BARBIE','ARCELIA','AJA','ZENOBIA','SHAREN','SHAREE','PATRICK','PAGE','MY','LAVINIA','KUM','KACIE','JACKELINE','HUONG','FELISA','EMELIA','ELEANORA','CYTHIA','CRISTIN','CLYDE','CLARIBEL','CARON','ANASTACIA','ZULMA','ZANDRA','YOKO','TENISHA','SUSANN','SHERILYN','SHAY','SHAWANDA','SABINE','ROMANA','MATHILDA','LINSEY','KEIKO','JOANA','ISELA','GRETTA','GEORGETTA','EUGENIE','DUSTY','DESIRAE','DELORA','CORAZON','ANTONINA','ANIKA','WILLENE','TRACEE','TAMATHA','REGAN','NICHELLE','MICKIE','MAEGAN','LUANA','LANITA','KELSIE','EDELMIRA','BREE','AFTON','TEODORA','TAMIE','SHENA','MEG','LINH','KELI','KACI','DANYELLE','BRITT','ARLETTE','ALBERTINE','ADELLE','TIFFINY','STORMY','SIMONA','NUMBERS','NICOLASA','NICHOL','NIA','NAKISHA','MEE','MAIRA','LOREEN','KIZZY','JOHNNY','JAY','FALLON','CHRISTENE','BOBBYE','ANTHONY','YING','VINCENZA','TANJA','RUBIE','RONI','QUEENIE','MARGARETT','KIMBERLI','IRMGARD','IDELL','HILMA','EVELINA','ESTA','EMILEE','DENNISE','DANIA','CARL','CARIE','ANTONIO','WAI','SANG','RISA','RIKKI','PARTICIA','MUI','MASAKO','MARIO','LUVENIA','LOREE','LONI','LIEN','KEVIN','GIGI','FLORENCIA','DORIAN','DENITA','DALLAS','CHI','BILLYE','ALEXANDER','TOMIKA','SHARITA','RANA','NIKOLE','NEOMA','MARGARITE','MADALYN','LUCINA','LAILA','KALI','JENETTE','GABRIELE','EVELYNE','ELENORA','CLEMENTINA','ALEJANDRINA','ZULEMA','VIOLETTE','VANNESSA','THRESA','RETTA','PIA','PATIENCE','NOELLA','NICKIE','JONELL','DELTA','CHUNG','CHAYA','CAMELIA','BETHEL','ANYA','ANDREW','THANH','SUZANN','SPRING','SHU','MILA','LILLA','LAVERNA','KEESHA','KATTIE','GIA','GEORGENE','EVELINE','ESTELL','ELIZBETH','VIVIENNE','VALLIE','TRUDIE','STEPHANE','MICHEL','MAGALY','MADIE','KENYETTA','KARREN','JANETTA','HERMINE','HARMONY','DRUCILLA','DEBBI','CELESTINA','CANDIE','BRITNI','BECKIE','AMINA','ZITA','YUN','YOLANDE','VIVIEN','VERNETTA','TRUDI','SOMMER','PEARLE','PATRINA','OSSIE','NICOLLE','LOYCE','LETTY','LARISA','KATHARINA','JOSELYN','JONELLE','JENELL','IESHA','HEIDE','FLORINDA','FLORENTINA','FLO','ELODIA','DORINE','BRUNILDA','BRIGID','ASHLI','ARDELLA','TWANA','THU','TARAH','SUNG','SHEA','SHAVON','SHANE','SERINA','RAYNA','RAMONITA','NGA','MARGURITE','LUCRECIA','KOURTNEY','KATI','JESUS','JESENIA','DIAMOND','CRISTA','AYANA','ALICA','ALIA','VINNIE','SUELLEN','ROMELIA','RACHELL','PIPER','OLYMPIA','MICHIKO','KATHALEEN','JOLIE','JESSI','JANESSA','HANA','HA','ELEASE','CARLETTA','BRITANY','SHONA','SALOME','ROSAMOND','REGENA','RAINA','NGOC','NELIA','LOUVENIA','LESIA','LATRINA','LATICIA','LARHONDA','JINA','JACKI','HOLLIS','HOLLEY','EMMY','DEEANN','CORETTA','ARNETTA','VELVET','THALIA','SHANICE','NETA','MIKKI','MICKI','LONNA','LEANA','LASHUNDA','KILEY','JOYE','JACQULYN','IGNACIA','HYUN','HIROKO','HENRY','HENRIETTE','ELAYNE','DELINDA','DARNELL','DAHLIA','COREEN','CONSUELA','CONCHITA','CELINE','BABETTE','AYANNA','ANETTE','ALBERTINA','SKYE','SHAWNEE','SHANEKA','QUIANA','PAMELIA','MIN','MERRI','MERLENE','MARGIT','KIESHA','KIERA','KAYLENE','JODEE','JENISE','ERLENE','EMMIE','ELSE','DARYL','DALILA','DAISEY','CODY','CASIE','BELIA','BABARA','VERSIE','VANESA','SHELBA','SHAWNDA','SAM','NORMAN','NIKIA','NAOMA','MARNA','MARGERET','MADALINE','LAWANA','KINDRA','JUTTA','JAZMINE','JANETT','HANNELORE','GLENDORA','GERTRUD','GARNETT','FREEDA','FREDERICA','FLORANCE','FLAVIA','DENNIS','CARLINE','BEVERLEE','ANJANETTE','VALDA','TRINITY','TAMALA','STEVIE','SHONNA','SHA','SARINA','ONEIDA','MICAH','MERILYN','MARLEEN','LURLINE','LENNA','KATHERIN','JIN','JENI','HAE','GRACIA','GLADY','FARAH','ERIC','ENOLA','EMA','DOMINQUE','DEVONA','DELANA','CECILA','CAPRICE','ALYSHA','ALI','ALETHIA','VENA','THERESIA','TAWNY','SONG','SHAKIRA','SAMARA','SACHIKO','RACHELE','PAMELLA','NICKY','MARNI','MARIEL','MAREN','MALISA','LIGIA','LERA','LATORIA','LARAE','KIMBER','KATHERN','KAREY','JENNEFER','JANETH','HALINA','FREDIA','DELISA','DEBROAH','CIERA','CHIN','ANGELIKA','ANDREE','ALTHA','YEN','VIVAN','TERRESA','TANNA','SUK','SUDIE','SOO','SIGNE','SALENA','RONNI','REBBECCA','MYRTIE','MCKENZIE','MALIKA','MAIDA','LOAN','LEONARDA','KAYLEIGH','FRANCE','ETHYL','ELLYN','DAYLE','CAMMIE','BRITTNI','BIRGIT','AVELINA','ASUNCION','ARIANNA','AKIKO','VENICE','TYESHA','TONIE','TIESHA','TAKISHA','STEFFANIE','SINDY','SANTANA','MEGHANN','MANDA','MACIE','LADY','KELLYE','KELLEE','JOSLYN','JASON','INGER','INDIRA','GLINDA','GLENNIS','FERNANDA','FAUSTINA','ENEIDA','ELICIA','DOT','DIGNA','DELL','ARLETTA','ANDRE','WILLIA','TAMMARA','TABETHA','SHERRELL','SARI','REFUGIO','REBBECA','PAULETTA','NIEVES','NATOSHA','NAKITA','MAMMIE','KENISHA','KAZUKO','KASSIE','GARY','EARLEAN','DAPHINE','CORLISS','CLOTILDE','CAROLYNE','BERNETTA','AUGUSTINA','AUDREA','ANNIS','ANNABELL','YAN','TENNILLE','TAMICA','SELENE','SEAN','ROSANA','REGENIA','QIANA','MARKITA','MACY','LEEANNE','LAURINE','KYM','JESSENIA','JANITA','GEORGINE','GENIE','EMIKO','ELVIE','DEANDRA','DAGMAR','CORIE','COLLEN','CHERISH','ROMAINE','PORSHA','PEARLENE','MICHELINE','MERNA','MARGORIE','MARGARETTA','LORE','KENNETH','JENINE','HERMINA','FREDERICKA','ELKE','DRUSILLA','DORATHY','DIONE','DESIRE','CELENA','BRIGIDA','ANGELES','ALLEGRA','THEO','TAMEKIA','SYNTHIA','STEPHEN','SOOK','SLYVIA','ROSANN','REATHA','RAYE','MARQUETTA','MARGART','LING','LAYLA','KYMBERLY','KIANA','KAYLEEN','KATLYN','KARMEN','JOELLA','IRINA','EMELDA','ELENI','DETRA','CLEMMIE','CHERYLL','CHANTELL','CATHEY','ARNITA','ARLA','ANGLE','ANGELIC','ALYSE','ZOFIA','THOMASINE','TENNIE','SON','SHERLY','SHERLEY','SHARYL','REMEDIOS','PETRINA','NICKOLE','MYUNG','MYRLE','MOZELLA','LOUANNE','LISHA','LATIA','LANE','KRYSTA','JULIENNE','JOEL','JEANENE','JACQUALINE','ISAURA','GWENDA','EARLEEN','DONALD','CLEOPATRA','CARLIE','AUDIE','ANTONIETTA','ALISE','ALEX','VERDELL','VAL','TYLER','TOMOKO','THAO','TALISHA','STEVEN','SO','SHEMIKA','SHAUN','SCARLET','SAVANNA','SANTINA','ROSIA','RAEANN','ODILIA','NANA','MINNA','MAGAN','LYNELLE','LE','KARMA','JOEANN','IVANA','INELL','ILANA','HYE','HONEY','HEE','GUDRUN','FRANK','DREAMA','CRISSY','CHANTE','CARMELINA','ARVILLA','ARTHUR','ANNAMAE','ALVERA','ALEIDA','AARON','YEE','YANIRA','VANDA','TIANNA','TAM','STEFANIA','SHIRA','PERRY','NICOL','NANCIE','MONSERRATE','MINH','MELYNDA','MELANY','MATTHEW','LOVELLA','LAURE','KIRBY','KACY','JACQUELYNN','HYON','GERTHA','FRANCISCO','ELIANA','CHRISTENA','CHRISTEEN','CHARISE','CATERINA','CARLEY','CANDYCE','ARLENA','AMMIE','YANG','WILLETTE','VANITA','TUYET','TINY','SYREETA','SILVA','SCOTT','RONALD','PENNEY','NYLA','MICHAL','MAURICE','MARYAM','MARYA','MAGEN','LUDIE','LOMA','LIVIA','LANELL','KIMBERLIE','JULEE','DONETTA','DIEDRA','DENISHA','DEANE','DAWNE','CLARINE','CHERRYL','BRONWYN','BRANDON','ALLA','VALERY','TONDA','SUEANN','SORAYA','SHOSHANA','SHELA','SHARLEEN','SHANELLE','NERISSA','MICHEAL','MERIDITH','MELLIE','MAYE','MAPLE','MAGARET','LUIS','LILI','LEONILA','LEONIE','LEEANNA','LAVONIA','LAVERA','KRISTEL','KATHEY','KATHE','JUSTIN','JULIAN','JIMMY','JANN','ILDA','HILDRED','HILDEGARDE','GENIA','FUMIKO','EVELIN','ERMELINDA','ELLY','DUNG','DOLORIS','DIONNA','DANAE','BERNEICE','ANNICE','ALIX','VERENA','VERDIE','TRISTAN','SHAWNNA','SHAWANA','SHAUNNA','ROZELLA','RANDEE','RANAE','MILAGRO','LYNELL','LUISE','LOUIE','LOIDA','LISBETH','KARLEEN','JUNITA','JONA','ISIS','HYACINTH','HEDY','GWENN','ETHELENE','ERLINE','EDWARD','DONYA','DOMONIQUE','DELICIA','DANNETTE','CICELY','BRANDA','BLYTHE','BETHANN','ASHLYN','ANNALEE','ALLINE','YUKO','VELLA','TRANG','TOWANDA','TESHA','SHERLYN','NARCISA','MIGUELINA','MERI','MAYBELL','MARLANA','MARGUERITA','MADLYN','LUNA','LORY','LORIANN','LIBERTY','LEONORE','LEIGHANN','LAURICE','LATESHA','LARONDA','KATRICE','KASIE','KARL','KALEY','JADWIGA','GLENNIE','GEARLDINE','FRANCINA','EPIFANIA','DYAN','DORIE','DIEDRE','DENESE','DEMETRICE','DELENA','DARBY','CRISTIE','CLEORA','CATARINA','CARISA','BERNIE','BARBERA','ALMETA','TRULA','TEREASA','SOLANGE','SHEILAH','SHAVONNE','SANORA','ROCHELL','MATHILDE','MARGARETA','MAIA','LYNSEY','LAWANNA','LAUNA','KENA','KEENA','KATIA','JAMEY','GLYNDA','GAYLENE','ELVINA','ELANOR','DANUTA','DANIKA','CRISTEN','CORDIE','COLETTA','CLARITA','CARMON','BRYNN','AZUCENA','AUNDREA','ANGELE','YI','WALTER','VERLIE','VERLENE','TAMESHA','SILVANA','SEBRINA','SAMIRA','REDA','RAYLENE','PENNI','PANDORA','NORAH','NOMA','MIREILLE','MELISSIA','MARYALICE','LARAINE','KIMBERY','KARYL','KARINE','KAM','JOLANDA','JOHANA','JESUSA','JALEESA','JAE','JACQUELYNE','IRISH','ILUMINADA','HILARIA','HANH','GENNIE','FRANCIE','FLORETTA','EXIE','EDDA','DREMA','DELPHA','BEV','BARBAR','ASSUNTA','ARDELL','ANNALISA','ALISIA','YUKIKO','YOLANDO','WONDA','WEI','WALTRAUD','VETA','TEQUILA','TEMEKA','TAMEIKA','SHIRLEEN','SHENITA','PIEDAD','OZELLA','MIRTHA','MARILU','KIMIKO','JULIANE','JENICE','JEN','JANAY','JACQUILINE','HILDE','FE','FAE','EVAN','EUGENE','ELOIS','ECHO','DEVORAH','CHAU','BRINDA','BETSEY','ARMINDA','ARACELIS','APRYL','ANNETT','ALISHIA','VEOLA','USHA','TOSHIKO','THEOLA','TASHIA','TALITHA','SHERY','RUDY','RENETTA','REIKO','RASHEEDA','OMEGA','OBDULIA','MIKA','MELAINE','MEGGAN','MARTIN','MARLEN','MARGET','MARCELINE','MANA','MAGDALEN','LIBRADA','LEZLIE','LEXIE','LATASHIA','LASANDRA','KELLE','ISIDRA','ISA','INOCENCIA','GWYN','FRANCOISE','ERMINIA','ERINN','DIMPLE','DEVORA','CRISELDA','ARMANDA','ARIE','ARIANE','ANGELO','ANGELENA','ALLEN','ALIZA','ADRIENE','ADALINE','XOCHITL','TWANNA','TRAN','TOMIKO','TAMISHA','TAISHA','SUSY','SIU','RUTHA','ROXY','RHONA','RAYMOND','OTHA','NORIKO','NATASHIA','MERRIE','MELVIN','MARINDA','MARIKO','MARGERT','LORIS','LIZZETTE','LEISHA','KAILA','KA','JOANNIE','JERRICA','JENE','JANNET','JANEE','JACINDA','HERTA','ELENORE','DORETTA','DELAINE','DANIELL','CLAUDIE','CHINA','BRITTA','APOLONIA','AMBERLY','ALEASE','YURI','YUK','WEN','WANETA','UTE','TOMI','SHARRI','SANDIE','ROSELLE','REYNALDA','RAGUEL','PHYLICIA','PATRIA','OLIMPIA','ODELIA','MITZIE','MITCHELL','MISS','MINDA','MIGNON','MICA','MENDY','MARIVEL','MAILE','LYNETTA','LAVETTE','LAURYN','LATRISHA','LAKIESHA','KIERSTEN','KARY','JOSPHINE','JOLYN','JETTA','JANISE','JACQUIE','IVELISSE','GLYNIS','GIANNA','GAYNELLE','EMERALD','DEMETRIUS','DANYELL','DANILLE','DACIA','CORALEE','CHER','CEOLA','BRETT','BELL','ARIANNE','ALESHIA','YUNG','WILLIEMAE','TROY','TRINH','THORA','TAI','SVETLANA','SHERIKA','SHEMEKA','SHAUNDA','ROSELINE','RICKI','MELDA','MALLIE','LAVONNA','LATINA','LARRY','LAQUANDA','LALA','LACHELLE','KLARA','KANDIS','JOHNA','JEANMARIE','JAYE','HANG','GRAYCE','GERTUDE','EMERITA','EBONIE','CLORINDA','CHING','CHERY','CAROLA','BREANN','BLOSSOM','BERNARDINE','BECKI','ARLETHA','ARGELIA','ARA','ALITA','YULANDA','YON','YESSENIA','TOBI','TASIA','SYLVIE','SHIRL','SHIRELY','SHERIDAN','SHELLA','SHANTELLE','SACHA','ROYCE','REBECKA','REAGAN','PROVIDENCIA','PAULENE','MISHA','MIKI','MARLINE','MARICA','LORITA','LATOYIA','LASONYA','KERSTIN','KENDA','KEITHA','KATHRIN','JAYMIE','JACK','GRICELDA','GINETTE','ERYN','ELINA','ELFRIEDA','DANYEL','CHEREE','CHANELLE','BARRIE','AVERY','AURORE','ANNAMARIA','ALLEEN','AILENE','AIDE','YASMINE','VASHTI','VALENTINE','TREASA','TORY','TIFFANEY','SHERYLL','SHARIE','SHANAE','SAU','RAISA','PA','NEDA','MITSUKO','MIRELLA','MILDA','MARYANNA','MARAGRET','MABELLE','LUETTA','LORINA','LETISHA','LATARSHA','LANELLE','LAJUANA','KRISSY','KARLY','KARENA','JON','JESSIKA','JERICA','JEANELLE','JANUARY','JALISA','JACELYN','IZOLA','IVEY','GREGORY','EUNA','ETHA','DREW','DOMITILA','DOMINICA','DAINA','CREOLA','CARLI','CAMIE','BUNNY','BRITTNY','ASHANTI','ANISHA','ALEEN','ADAH','YASUKO','WINTER','VIKI','VALRIE','TONA','TINISHA','THI','TERISA','TATUM','TANEKA','SIMONNE','SHALANDA','SERITA','RESSIE','REFUGIA','PAZ','OLENE','NA','MERRILL','MARGHERITA','MANDIE','MAN','MAIRE','LYNDIA','LUCI','LORRIANE','LORETA','LEONIA','LAVONA','LASHAWNDA','LAKIA','KYOKO','KRYSTINA','KRYSTEN','KENIA','KELSI','JUDE','JEANICE','ISOBEL','GEORGIANN','GENNY','FELICIDAD','EILENE','DEON','DELOISE','DEEDEE','DANNIE','CONCEPTION','CLORA','CHERILYN','CHANG','CALANDRA','BERRY','ARMANDINA','ANISA','ULA','TIMOTHY','TIERA','THERESSA','STEPHANIA','SIMA','SHYLA','SHONTA','SHERA','SHAQUITA','SHALA','SAMMY','ROSSANA','NOHEMI','NERY','MORIAH','MELITA','MELIDA','MELANI','MARYLYNN','MARISHA','MARIETTE','MALORIE','MADELENE','LUDIVINA','LORIA','LORETTE','LORALEE','LIANNE','LEON','LAVENIA','LAURINDA','LASHON','KIT','KIMI','KEILA','KATELYNN','KAI','JONE','JOANE','JI','JAYNA','JANELLA','JA','HUE','HERTHA','FRANCENE','ELINORE','DESPINA','DELSIE','DEEDRA','CLEMENCIA','CARRY','CAROLIN','CARLOS','BULAH','BRITTANIE','BOK','BLONDELL','BIBI','BEAULAH','BEATA','ANNITA','AGRIPINA','VIRGEN','VALENE','UN','TWANDA','TOMMYE','TOI','TARRA','TARI','TAMMERA','SHAKIA','SADYE','RUTHANNE','ROCHEL','RIVKA','PURA','NENITA','NATISHA','MING','MERRILEE','MELODEE','MARVIS','LUCILLA','LEENA','LAVETA','LARITA','LANIE','KEREN','ILEEN','GEORGEANN','GENNA','GENESIS','FRIDA','EWA','EUFEMIA','EMELY','ELA','EDYTH','DEONNA','DEADRA','DARLENA','CHANELL','CHAN','CATHERN','CASSONDRA','CASSAUNDRA','BERNARDA','BERNA','ARLINDA','ANAMARIA','ALBERT','WESLEY','VERTIE','VALERI','TORRI','TATYANA','STASIA','SHERISE','SHERILL','SEASON','SCOTTIE','SANDA','RUTHE','ROSY','ROBERTO','ROBBI','RANEE','QUYEN','PEARLY','PALMIRA','ONITA','NISHA','NIESHA','NIDA','NEVADA','NAM','MERLYN','MAYOLA','MARYLOUISE','MARYLAND','MARX','MARTH','MARGENE','MADELAINE','LONDA','LEONTINE','LEOMA','LEIA','LAWRENCE','LAURALEE','LANORA','LAKITA','KIYOKO','KETURAH','KATELIN','KAREEN','JONIE','JOHNETTE','JENEE','JEANETT','IZETTA','HIEDI','HEIKE','HASSIE','HAROLD','GIUSEPPINA','GEORGANN','FIDELA','FERNANDE','ELWANDA','ELLAMAE','ELIZ','DUSTI','DOTTY','CYNDY','CORALIE','CELESTA','ARGENTINA','ALVERTA','XENIA','WAVA','VANETTA','TORRIE','TASHINA','TANDY','TAMBRA','TAMA','STEPANIE','SHILA','SHAUNTA','SHARAN','SHANIQUA','SHAE','SETSUKO','SERAFINA','SANDEE','ROSAMARIA','PRISCILA','OLINDA','NADENE','MUOI','MICHELINA','MERCEDEZ','MARYROSE','MARIN','MARCENE','MAO','MAGALI','MAFALDA','LOGAN','LINN','LANNIE','KAYCE','KAROLINE','KAMILAH','KAMALA','JUSTA','JOLINE','JENNINE','JACQUETTA','IRAIDA','GERALD','GEORGEANNA','FRANCHESCA','FAIRY','EMELINE','ELANE','EHTEL','EARLIE','DULCIE','DALENE','CRIS','CLASSIE','CHERE','CHARIS','CAROYLN','CARMINA','CARITA','BRIAN','BETHANIE','AYAKO','ARICA','AN','ALYSA','ALESSANDRA','AKILAH','ADRIEN','ZETTA','YOULANDA','YELENA','YAHAIRA','XUAN','WENDOLYN','VICTOR','TIJUANA','TERRELL','TERINA','TERESIA','SUZI','SUNDAY','SHERELL','SHAVONDA','SHAUNTE','SHARDA','SHAKITA','SENA','RYANN','RUBI','RIVA','REGINIA','REA','RACHAL','PARTHENIA','PAMULA','MONNIE','MONET','MICHAELE','MELIA','MARINE','MALKA','MAISHA','LISANDRA','LEO','LEKISHA','LEAN','LAURENCE','LAKENDRA','KRYSTIN','KORTNEY','KIZZIE','KITTIE','KERA','KENDAL','KEMBERLY','KANISHA','JULENE','JULE','JOSHUA','JOHANNE','JEFFREY','JAMEE','HAN','HALLEY','GIDGET','GALINA','FREDRICKA','FLETA','FATIMAH','EUSEBIA','ELZA','ELEONORE','DORTHEY','DORIA','DONELLA','DINORAH','DELORSE','CLARETHA','CHRISTINIA','CHARLYN','BONG','BELKIS','AZZIE','ANDERA','AIKO','ADENA','YER','YAJAIRA','WAN','VANIA','ULRIKE','TOSHIA','TIFANY','STEFANY','SHIZUE','SHENIKA','SHAWANNA','SHAROLYN','SHARILYN','SHAQUANA','SHANTAY','SEE','ROZANNE','ROSELEE','RICKIE','REMONA','REANNA','RAELENE','QUINN','PHUNG','PETRONILA','NATACHA','NANCEY','MYRL','MIYOKO','MIESHA','MERIDETH','MARVELLA','MARQUITTA','MARHTA','MARCHELLE','LIZETH','LIBBIE','LAHOMA','LADAWN','KINA','KATHELEEN','KATHARYN','KARISA','KALEIGH','JUNIE','JULIEANN','JOHNSIE','JANEAN','JAIMEE','JACKQUELINE','HISAKO','HERMA','HELAINE','GWYNETH','GLENN','GITA','EUSTOLIA','EMELINA','ELIN','EDRIS','DONNETTE','DONNETTA','DIERDRE','DENAE','DARCEL','CLAUDE','CLARISA','CINDERELLA','CHIA','CHARLESETTA','CHARITA','CELSA','CASSY','CASSI','CARLEE','BRUNA','BRITTANEY','BRANDE','BILLI','BAO','ANTONETTA','ANGLA','ANGELYN','ANALISA','ALANE','WENONA','WENDIE','VERONIQUE','VANNESA','TOBIE','TEMPIE','SUMIKO','SULEMA','SPARKLE','SOMER','SHEBA','SHAYNE','SHARICE','SHANEL','SHALON','SAGE','ROY','ROSIO','ROSELIA','RENAY','REMA','REENA','PORSCHE','PING','PEG','OZIE','ORETHA','ORALEE','ODA','NU','NGAN','NAKESHA','MILLY','MARYBELLE','MARLIN','MARIS','MARGRETT','MARAGARET','MANIE','LURLENE','LILLIA','LIESELOTTE','LAVELLE','LASHAUNDA','LAKEESHA','KEITH','KAYCEE','KALYN','JOYA','JOETTE','JENAE','JANIECE','ILLA','GRISEL','GLAYDS','GENEVIE','GALA','FREDDA','FRED','ELMER','ELEONOR','DEBERA','DEANDREA','DAN','CORRINNE','CORDIA','CONTESSA','COLENE','CLEOTILDE','CHARLOTT','CHANTAY','CECILLE','BEATRIS','AZALEE','ARLEAN','ARDATH','ANJELICA','ANJA','ALFREDIA','ALEISHA','ADAM','ZADA','YUONNE','XIAO','WILLODEAN','WHITLEY','VENNIE','VANNA','TYISHA','TOVA','TORIE','TONISHA','TILDA','TIEN','TEMPLE','SIRENA','SHERRIL','SHANTI','SHAN','SENAIDA','SAMELLA','ROBBYN','RENDA','REITA','PHEBE','PAULITA','NOBUKO','NGUYET','NEOMI','MOON','MIKAELA','MELANIA','MAXIMINA','MARG','MAISIE','LYNNA','LILLI','LAYNE','LASHAUN','LAKENYA','LAEL','KIRSTIE','KATHLINE','KASHA','KARLYN','KARIMA','JOVAN','JOSEFINE','JENNELL','JACQUI','JACKELYN','HYO','HIEN','GRAZYNA','FLORRIE','FLORIA','ELEONORA','DWANA','DORLA','DONG','DELMY','DEJA','DEDE','DANN','CRYSTA','CLELIA','CLARIS','CLARENCE','CHIEKO','CHERLYN','CHERELLE','CHARMAIN','CHARA','CAMMY','BEE','ARNETTE','ARDELLE','ANNIKA','AMIEE','AMEE','ALLENA','YVONE','YUKI','YOSHIE','YEVETTE','YAEL','WILLETTA','VONCILE','VENETTA','TULA','TONETTE','TIMIKA','TEMIKA','TELMA','TEISHA','TAREN','TA','STACEE','SHIN','SHAWNTA','SATURNINA','RICARDA','POK','PASTY','ONIE','NUBIA','MORA','MIKE','MARIELLE','MARIELLA','MARIANELA','MARDELL','MANY','LUANNA','LOISE','LISABETH','LINDSY','LILLIANA','LILLIAM','LELAH','LEIGHA','LEANORA','LANG','KRISTEEN','KHALILAH','KEELEY','KANDRA','JUNKO','JOAQUINA','JERLENE','JANI','JAMIKA','JAME','HSIU','HERMILA','GOLDEN','GENEVIVE','EVIA','EUGENA','EMMALINE','ELFREDA','ELENE','DONETTE','DELCIE','DEEANNA','DARCEY','CUC','CLARINDA','CIRA','CHAE','CELINDA','CATHERYN','CATHERIN','CASIMIRA','CARMELIA','CAMELLIA','BREANA','BOBETTE','BERNARDINA','BEBE','BASILIA','ARLYNE','AMAL','ALAYNA','ZONIA','ZENIA','YURIKO','YAEKO','WYNELL','WILLOW','WILLENA','VERNIA','TU','TRAVIS','TORA','TERRILYN','TERICA','TENESHA','TAWNA','TAJUANA','TAINA','STEPHNIE','SONA','SOL','SINA','SHONDRA','SHIZUKO','SHERLENE','SHERICE','SHARIKA','ROSSIE','ROSENA','RORY','RIMA','RIA','RHEBA','RENNA','PETER','NATALYA','NANCEE','MELODI','MEDA','MAXIMA','MATHA','MARKETTA','MARICRUZ','MARCELENE','MALVINA','LUBA','LOUETTA','LEIDA','LECIA','LAURAN','LASHAWNA','LAINE','KHADIJAH','KATERINE','KASI','KALLIE','JULIETTA','JESUSITA','JESTINE','JESSIA','JEREMY','JEFFIE','JANYCE','ISADORA','GEORGIANNE','FIDELIA','EVITA','EURA','EULAH','ESTEFANA','ELSY','ELIZABET','ELADIA','DODIE','DION','DIA','DENISSE','DELORAS','DELILA','DAYSI','DAKOTA','CURTIS','CRYSTLE','CONCHA','COLBY','CLARETTA','CHU','CHRISTIA','CHARLSIE','CHARLENA','CARYLON','BETTYANN','ASLEY','ASHLEA','AMIRA','AI','AGUEDA','AGNUS','YUETTE','VINITA','VICTORINA','TYNISHA','TREENA','TOCCARA','TISH','THOMASENA','TEGAN','SOILA','SHILOH','SHENNA','SHARMAINE','SHANTAE','SHANDI','SEPTEMBER','SARAN','SARAI','SANA','SAMUEL','SALLEY','ROSETTE','ROLANDE','REGINE','OTELIA','OSCAR','OLEVIA','NICHOLLE','NECOLE','NAIDA','MYRTA','MYESHA','MITSUE','MINTA','MERTIE','MARGY','MAHALIA','MADALENE','LOVE','LOURA','LOREAN','LEWIS','LESHA','LEONIDA','LENITA','LAVONE','LASHELL','LASHANDRA','LAMONICA','KIMBRA','KATHERINA','KARRY','KANESHA','JULIO','JONG','JENEVA','JAQUELYN','HWA','GILMA','GHISLAINE','GERTRUDIS','FRANSISCA','FERMINA','ETTIE','ETSUKO','ELLIS','ELLAN','ELIDIA','EDRA','DORETHEA','DOREATHA','DENYSE','DENNY','DEETTA','DAINE','CYRSTAL','CORRIN','CAYLA','CARLITA','CAMILA','BURMA','BULA','BUENA','BLAKE','BARABARA','AVRIL','AUSTIN','ALAINE','ZANA','WILHEMINA','WANETTA','VIRGIL','VI','VERONIKA','VERNON','VERLINE','VASILIKI','TONITA','TISA','TEOFILA','TAYNA','TAUNYA','TANDRA','TAKAKO','SUNNI','SUANNE','SIXTA','SHARELL','SEEMA','RUSSELL','ROSENDA','ROBENA','RAYMONDE','PEI','PAMILA','OZELL','NEIDA','NEELY','MISTIE','MICHA','MERISSA','MAURITA','MARYLN','MARYETTA','MARSHALL','MARCELL','MALENA','MAKEDA','MADDIE','LOVETTA','LOURIE','LORRINE','LORILEE','LESTER','LAURENA','LASHAY','LARRAINE','LAREE','LACRESHA','KRISTLE','KRISHNA','KEVA','KEIRA','KAROLE','JOIE','JINNY','JEANNETTA','JAMA','HEIDY','GILBERTE','GEMA','FAVIOLA','EVELYNN','ENDA','ELLI','ELLENA','DIVINA','DAGNY','COLLENE','CODI','CINDIE','CHASSIDY','CHASIDY','CATRICE','CATHERINA','CASSEY','CAROLL','CARLENA','CANDRA','CALISTA','BRYANNA','BRITTENY','BEULA','BARI','AUDRIE','AUDRIA','ARDELIA','ANNELLE','ANGILA','ALONA','ALLYN','DOUGLAS','ROGER','JONATHAN','RALPH','NICHOLAS','BENJAMIN','BRUCE','HARRY','WAYNE','STEVE','HOWARD','ERNEST','PHILLIP','TODD','CRAIG','ALAN','PHILIP','EARL','DANNY','BRYAN','STANLEY','LEONARD','NATHAN','MANUEL','RODNEY','MARVIN','VINCENT','JEFFERY','JEFF','CHAD','JACOB','ALFRED','BRADLEY','HERBERT','FREDERICK','EDWIN','DON','RICKY','RANDALL','BARRY','BERNARD','LEROY','MARCUS','THEODORE','CLIFFORD','MIGUEL','JIM','TOM','CALVIN','BILL','LLOYD','DEREK','WARREN','DARRELL','JEROME','FLOYD','ALVIN','TIM','GORDON','GREG','JORGE','DUSTIN','PEDRO','DERRICK','ZACHARY','HERMAN','GLEN','HECTOR','RICARDO','RICK','BRENT','RAMON','GILBERT','MARC','REGINALD','RUBEN','NATHANIEL','RAFAEL','EDGAR','MILTON','RAUL','BEN','CHESTER','DUANE','FRANKLIN','BRAD','RON','ROLAND','ARNOLD','HARVEY','JARED','ERIK','DARRYL','NEIL','JAVIER','FERNANDO','CLINTON','TED','MATHEW','TYRONE','DARREN','LANCE','KURT','ALLAN','NELSON','GUY','CLAYTON','HUGH','MAX','DWAYNE','DWIGHT','ARMANDO','FELIX','EVERETT','IAN','WALLACE','KEN','BOB','ALFREDO','ALBERTO','DAVE','IVAN','BYRON','ISAAC','MORRIS','CLIFTON','WILLARD','ROSS','ANDY','SALVADOR','KIRK','SERGIO','SETH','KENT','TERRANCE','EDUARDO','TERRENCE','ENRIQUE','WADE','STUART','FREDRICK','ARTURO','ALEJANDRO','NICK','LUTHER','WENDELL','JEREMIAH','JULIUS','OTIS','TREVOR','OLIVER','LUKE','HOMER','GERARD','DOUG','KENNY','HUBERT','LYLE','MATT','ALFONSO','ORLANDO','REX','CARLTON','ERNESTO','NEAL','PABLO','LORENZO','OMAR','WILBUR','GRANT','HORACE','RODERICK','ABRAHAM','WILLIS','RICKEY','ANDRES','CESAR','JOHNATHAN','MALCOLM','RUDOLPH','DAMON','KELVIN','PRESTON','ALTON','ARCHIE','MARCO','WM','PETE','RANDOLPH','GARRY','GEOFFREY','JONATHON','FELIPE','GERARDO','ED','DOMINIC','DELBERT','COLIN','GUILLERMO','EARNEST','LUCAS','BENNY','SPENCER','RODOLFO','MYRON','EDMUND','GARRETT','SALVATORE','CEDRIC','LOWELL','GREGG','SHERMAN','WILSON','SYLVESTER','ROOSEVELT','ISRAEL','JERMAINE','FORREST','WILBERT','LELAND','SIMON','CLARK','IRVING','BRYANT','OWEN','RUFUS','WOODROW','KRISTOPHER','MACK','LEVI','MARCOS','GUSTAVO','JAKE','LIONEL','GILBERTO','CLINT','NICOLAS','ISMAEL','ORVILLE','ERVIN','DEWEY','AL','WILFRED','JOSH','HUGO','IGNACIO','CALEB','TOMAS','SHELDON','ERICK','STEWART','DOYLE','DARREL','ROGELIO','TERENCE','SANTIAGO','ALONZO','ELIAS','BERT','ELBERT','RAMIRO','CONRAD','NOAH','GRADY','PHIL','CORNELIUS','LAMAR','ROLANDO','CLAY','PERCY','DEXTER','BRADFORD','DARIN','AMOS','MOSES','IRVIN','SAUL','ROMAN','RANDAL','TIMMY','DARRIN','WINSTON','BRENDAN','ABEL','DOMINICK','BOYD','EMILIO','ELIJAH','DOMINGO','EMMETT','MARLON','EMANUEL','JERALD','EDMOND','EMIL','DEWAYNE','WILL','OTTO','TEDDY','REYNALDO','BRET','JESS','TRENT','HUMBERTO','EMMANUEL','STEPHAN','VICENTE','LAMONT','GARLAND','MILES','EFRAIN','HEATH','RODGER','HARLEY','ETHAN','ELDON','ROCKY','PIERRE','JUNIOR','FREDDY','ELI','BRYCE','ANTOINE','STERLING','CHASE','GROVER','ELTON','CLEVELAND','DYLAN','CHUCK','DAMIAN','REUBEN','STAN','AUGUST','LEONARDO','JASPER','RUSSEL','ERWIN','BENITO','HANS','MONTE','BLAINE','ERNIE','CURT','QUENTIN','AGUSTIN','MURRAY','JAMAL','ADOLFO','HARRISON','TYSON','BURTON','BRADY','ELLIOTT','WILFREDO','BART','JARROD','VANCE','DENIS','DAMIEN','JOAQUIN','HARLAN','DESMOND','ELLIOT','DARWIN','GREGORIO','BUDDY','XAVIER','KERMIT','ROSCOE','ESTEBAN','ANTON','SOLOMON','SCOTTY','NORBERT','ELVIN','WILLIAMS','NOLAN','ROD','QUINTON','HAL','BRAIN','ROB','ELWOOD','KENDRICK','DARIUS','MOISES','FIDEL','THADDEUS','CLIFF','MARCEL','JACKSON','RAPHAEL','BRYON','ARMAND','ALVARO','JEFFRY','DANE','JOESPH','THURMAN','NED','RUSTY','MONTY','FABIAN','REGGIE','MASON','GRAHAM','ISAIAH','VAUGHN','GUS','LOYD','DIEGO','ADOLPH','NORRIS','MILLARD','ROCCO','GONZALO','DERICK','RODRIGO','WILEY','RIGOBERTO','ALPHONSO','TY','NOE','VERN','REED','JEFFERSON','ELVIS','BERNARDO','MAURICIO','HIRAM','DONOVAN','BASIL','RILEY','NICKOLAS','MAYNARD','SCOT','VINCE','QUINCY','EDDY','SEBASTIAN','FEDERICO','ULYSSES','HERIBERTO','DONNELL','COLE','DAVIS','GAVIN','EMERY','WARD','ROMEO','JAYSON','DANTE','CLEMENT','COY','MAXWELL','JARVIS','BRUNO','ISSAC','DUDLEY','BROCK','SANFORD','CARMELO','BARNEY','NESTOR','STEFAN','DONNY','ART','LINWOOD','BEAU','WELDON','GALEN','ISIDRO','TRUMAN','DELMAR','JOHNATHON','SILAS','FREDERIC','DICK','IRWIN','MERLIN','CHARLEY','MARCELINO','HARRIS','CARLO','TRENTON','KURTIS','HUNTER','AURELIO','WINFRED','VITO','COLLIN','DENVER','CARTER','LEONEL','EMORY','PASQUALE','MOHAMMAD','MARIANO','DANIAL','LANDON','DIRK','BRANDEN','ADAN','BUFORD','GERMAN','WILMER','EMERSON','ZACHERY','FLETCHER','JACQUES','ERROL','DALTON','MONROE','JOSUE','EDWARDO','BOOKER','WILFORD','SONNY','SHELTON','CARSON','THERON','RAYMUNDO','DAREN','HOUSTON','ROBBY','LINCOLN','GENARO','BENNETT','OCTAVIO','CORNELL','HUNG','ARRON','ANTONY','HERSCHEL','GIOVANNI','GARTH','CYRUS','CYRIL','RONNY','LON','FREEMAN','DUNCAN','KENNITH','CARMINE','ERICH','CHADWICK','WILBURN','RUSS','REID','MYLES','ANDERSON','MORTON','JONAS','FOREST','MITCHEL','MERVIN','ZANE','RICH','JAMEL','LAZARO','ALPHONSE','RANDELL','MAJOR','JARRETT','BROOKS','ABDUL','LUCIANO','SEYMOUR','EUGENIO','MOHAMMED','VALENTIN','CHANCE','ARNULFO','LUCIEN','FERDINAND','THAD','EZRA','ALDO','RUBIN','ROYAL','MITCH','EARLE','ABE','WYATT','MARQUIS','LANNY','KAREEM','JAMAR','BORIS','ISIAH','EMILE','ELMO','ARON','LEOPOLDO','EVERETTE','JOSEF','ELOY','RODRICK','REINALDO','LUCIO','JERROD','WESTON','HERSHEL','BARTON','PARKER','LEMUEL','BURT','JULES','GIL','ELISEO','AHMAD','NIGEL','EFREN','ANTWAN','ALDEN','MARGARITO','COLEMAN','DINO','OSVALDO','LES','DEANDRE','NORMAND','KIETH','TREY','NORBERTO','NAPOLEON','JEROLD','FRITZ','ROSENDO','MILFORD','CHRISTOPER','ALFONZO','LYMAN','JOSIAH','BRANT','WILTON','RICO','JAMAAL','DEWITT','BRENTON','OLIN','FOSTER','FAUSTINO','CLAUDIO','JUDSON','GINO','EDGARDO','ALEC','TANNER','JARRED','DONN','TAD','PRINCE','PORFIRIO','ODIS','LENARD','CHAUNCEY','TOD','MEL','MARCELO','KORY','AUGUSTUS','KEVEN','HILARIO','BUD','SAL','ORVAL','MAURO','ZACHARIAH','OLEN','ANIBAL','MILO','JED','DILLON','AMADO','NEWTON','LENNY','RICHIE','HORACIO','BRICE','MOHAMED','DELMER','DARIO','REYES','MAC','JONAH','JERROLD','ROBT','HANK','RUPERT','ROLLAND','KENTON','DAMION','ANTONE','WALDO','FREDRIC','BRADLY','KIP','BURL','WALKER','TYREE','JEFFEREY','AHMED','WILLY','STANFORD','OREN','NOBLE','MOSHE','MIKEL','ENOCH','BRENDON','QUINTIN','JAMISON','FLORENCIO','DARRICK','TOBIAS','HASSAN','GIUSEPPE','DEMARCUS','CLETUS','TYRELL','LYNDON','KEENAN','WERNER','GERALDO','COLUMBUS','CHET','BERTRAM','MARKUS','HUEY','HILTON','DWAIN','DONTE','TYRON','OMER','ISAIAS','HIPOLITO','FERMIN','ADALBERTO','BO','BARRETT','TEODORO','MCKINLEY','MAXIMO','GARFIELD','RALEIGH','LAWERENCE','ABRAM','RASHAD','KING','EMMITT','DARON','SAMUAL','MIQUEL','EUSEBIO','DOMENIC','DARRON','BUSTER','WILBER','RENATO','JC','HOYT','HAYWOOD','EZEKIEL','CHAS','FLORENTINO','ELROY','CLEMENTE','ARDEN','NEVILLE','EDISON','DESHAWN','NATHANIAL','JORDON','DANILO','CLAUD','SHERWOOD','RAYMON','RAYFORD','CRISTOBAL','AMBROSE','TITUS','HYMAN','FELTON','EZEQUIEL','ERASMO','STANTON','LONNY','LEN','IKE','MILAN','LINO','JAROD','HERB','ANDREAS','WALTON','RHETT','PALMER','DOUGLASS','CORDELL','OSWALDO','ELLSWORTH','VIRGILIO','TONEY','NATHANAEL','DEL','BENEDICT','MOSE','JOHNSON','ISREAL','GARRET','FAUSTO','ASA','ARLEN','ZACK','WARNER','MODESTO','FRANCESCO','MANUAL','GAYLORD','GASTON','FILIBERTO','DEANGELO','MICHALE','GRANVILLE','WES','MALIK','ZACKARY','TUAN','ELDRIDGE','CRISTOPHER','CORTEZ','ANTIONE','MALCOM','LONG','KOREY','JOSPEH','COLTON','WAYLON','VON','HOSEA','SHAD','SANTO','RUDOLF','ROLF','REY','RENALDO','MARCELLUS','LUCIUS','KRISTOFER','BOYCE','BENTON','HAYDEN','HARLAND','ARNOLDO','RUEBEN','LEANDRO','KRAIG','JERRELL','JEROMY','HOBERT','CEDRICK','ARLIE','WINFORD','WALLY','LUIGI','KENETH','JACINTO','GRAIG','FRANKLYN','EDMUNDO','SID','PORTER','LEIF','JERAMY','BUCK','WILLIAN','VINCENZO','SHON','LYNWOOD','JERE','HAI','ELDEN','DORSEY','DARELL','BRODERICK','ALONSO'];" + ], + "tail": [] } } }, @@ -1296,8 +1408,8 @@ "", "sumOfNonAbundantNumbers(28123);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1344,8 +1456,8 @@ "", "lexicographicPermutations(999999);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1406,8 +1518,8 @@ "", "digitFibonacci(20);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1465,8 +1577,8 @@ "", "reciprocalCycles(1000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1519,8 +1631,8 @@ "", "quadraticPrimes(1000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1572,8 +1684,8 @@ "", "spiralDiagonals(1001);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1625,8 +1737,8 @@ "", "distinctPowers(30);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1677,8 +1789,8 @@ "", "digitnPowers(5);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1727,8 +1839,8 @@ "", "coinSums(200);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1739,11 +1851,17 @@ "title": "Problem 32: Pandigital products", "tests": [ { - "text": "euler32() should return 45228.", - "testString": "assert.strictEqual(euler32(), 45228, 'euler32() should return 45228.');" + "text": "pandigitalProducts() is a function.", + "testString": "assert(typeof pandigitalProducts === 'function', 'pandigitalProducts() is a function.');" + }, + { + "text": "pandigitalProducts() should return 45228.", + "testString": "assert.strictEqual(pandigitalProducts(), 45228, 'pandigitalProducts() should return 45228.');" } ], - "solutions": [], + "solutions": [ + "function pandigitalProducts() {\n function is1to9Pandigital(...numbers) {\n const digitStr = concatenateNums(...numbers);\n // check if length is 9\n if (digitStr.length !== 9) {\n return false;\n }\n // check if pandigital\n for (let i = digitStr.length; i > 0; i--) {\n if (digitStr.indexOf(i.toString()) === -1) {\n return false;\n }\n }\n return true;\n }\n function concatenateNums(...numbers) {\n let digitStr = '';\n for (let i = 0; i < numbers.length; i++) {\n digitStr += numbers[i].toString();\n }\n return digitStr;\n }\n\n const pandigitalNums = [];\n let sum = 0;\n for (let mult1 = 2; mult1 < 9876; mult1++) {\n let mult2 = 123;\n while (concatenateNums(mult1, mult2, mult1 * mult2).length < 10) {\n if (is1to9Pandigital(mult1, mult2, mult1 * mult2) && !pandigitalNums.includes(mult1 * mult2)) {\n pandigitalNums.push(mult1 * mult2);\n sum += mult1 * mult2;\n }\n mult2++;\n }\n }\n return sum;\n}" + ], "translations": {}, "description": [ "We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital.", @@ -1760,15 +1878,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler32() {", + "function pandigitalProducts() {", " // Good luck!", " return true;", "}", "", - "euler32();" + "pandigitalProducts();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1779,15 +1897,17 @@ "title": "Problem 33: Digit cancelling fractions", "tests": [ { - "text": "euler33() should return 100.", - "testString": "assert.strictEqual(euler33(), 100, 'euler33() should return 100.');" + "text": "digitCancellingFractions() should return 100.", + "testString": "assert.strictEqual(digitCancellingFractions(), 100, 'digitCancellingFractions() should return 100.');" } ], - "solutions": [], + "solutions": [ + "function digitCancellingFractions() {\n function isCurious(numerator, denominator) {\n const fraction = numerator / denominator;\n const numString = numerator.toString();\n const denString = denominator.toString();\n\n if (numString[1] === '0' && denString[1] === '0') {\n // trivial\n return false;\n }\n for (let i = 0; i < 2; i++) {\n for (let j = 0; j < 2; j++) {\n if (numString[i] === denString[j]) {\n const newNum = parseInt(numString[1 - i], 10);\n const newDen = parseInt(denString[1 - j], 10);\n if (newNum / newDen === fraction) {\n return true;\n }\n }\n }\n }\n return false;\n }\n function findLargestDivisor(a, b) {\n let gcd = a > b ? b : a;\n while (gcd > 1) {\n if (a % gcd === 0 && b % gcd === 0) {\n return gcd;\n }\n gcd--;\n }\n return gcd;\n }\n\n function simplifyFraction(numerator, denominator) {\n const divisor = findLargestDivisor(numerator, denominator);\n return [numerator / divisor, denominator / divisor];\n }\n\n let multipleNumerator = 1;\n let multipleDenominator = 1;\n\n for (let denominator = 11; denominator < 100; denominator++) {\n for (let numerator = 10; numerator < denominator; numerator++) {\n if (isCurious(numerator, denominator)) {\n multipleNumerator *= numerator;\n multipleDenominator *= denominator;\n }\n }\n }\n\n return simplifyFraction(multipleNumerator, multipleDenominator)[1];\n}" + ], "translations": {}, "description": [ - "The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s.", - "We shall consider fractions like, 30/50 = 3/5, to be trivial examples.", + "The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s.", + "We shall consider fractions like, 30/50 = 3/5, to be trivial examples.", "There are exactly four non-trivial examples of this type of fraction, less than one in value, and containing two digits in the numerator and denominator.", "If the product of these four fractions is given in its lowest common terms, find the value of the denominator." ], @@ -1797,15 +1917,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler33() {", + "function digitCancellingFractions() {", " // Good luck!", " return true;", "}", "", - "euler33();" + "digitCancellingFractions();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1842,8 +1962,8 @@ "", "digitFactorial();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1898,8 +2018,8 @@ "", "circularPrimes(1000000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1946,8 +2066,8 @@ "", "doubleBasePalindromes(1000000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1994,8 +2114,8 @@ "", "truncatablePrimes(11);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2006,20 +2126,22 @@ "title": "Problem 38: Pandigital multiples", "tests": [ { - "text": "euler38() should return 932718654.", - "testString": "assert.strictEqual(euler38(), 932718654, 'euler38() should return 932718654.');" + "text": "pandigitalMultiples() should return 932718654.", + "testString": "assert.strictEqual(pandigitalMultiples(), 932718654, 'pandigitalMultiples() should return 932718654.');" } ], - "solutions": [], + "solutions": [ + "function pandigitalMultiples() {\n\n function get9DigitConcatenatedProduct(num) {\n // returns false if concatenated product is not 9 digits\n let concatenatedProduct = num.toString();\n for (let i = 2; concatenatedProduct.length < 9; i++) {\n concatenatedProduct += num * i;\n }\n return concatenatedProduct.length === 9 ? concatenatedProduct : false;\n }\n\n function is1to9Pandigital(num) {\n const numStr = num.toString();\n\n // check if length is not 9\n if (numStr.length !== 9) {\n return false;\n }\n\n // check if pandigital\n for (let i = 9; i > 0; i--) {\n if (numStr.indexOf(i.toString()) === -1) {\n return false;\n }\n }\n return true;\n }\n\n let largestNum = 0;\n for (let i = 9999; i >= 9000; i--) {\n const concatenatedProduct = get9DigitConcatenatedProduct(i);\n if (is1to9Pandigital(concatenatedProduct) && concatenatedProduct > largestNum) {\n largestNum = parseInt(concatenatedProduct);\n break;\n }\n }\n return largestNum;\n}" + ], "translations": {}, "description": [ "Take the number 192 and multiply it by each of 1, 2, and 3:", "192 × 1 = 192", "192 × 2 = 384", "192 × 3 = 576", - "By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 192384576 the concatenated product of 192 and (1,2,3)", - "The same can be achieved by starting with 9 and multiplying by 1, 2, 3, 4, and 5, giving the pandigital, 918273645, which is the concatenated product of 9 and (1,2,3,4,5).", - "What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1,2, ... , n) where n > 1?" + "By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 192384576 the concatenated product of 192 and (1, 2, 3).", + "The same can be achieved by starting with 9 and multiplying by 1, 2, 3, 4, and 5, giving the pandigital, 918273645, which is the concatenated product of 9 and (1, 2, 3, 4, 5).", + "What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1, 2, ... , n) where n > 1?" ], "files": { "indexjs": { @@ -2027,15 +2149,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler38() {", + "function pandigitalMultiples() {", " // Good luck!", " return true;", "}", "", - "euler38();" + "pandigitalMultiples();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2082,8 +2204,8 @@ "", "intRightTriangles(1000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2094,18 +2216,28 @@ "title": "Problem 40: Champernowne's constant", "tests": [ { - "text": "euler40() should return 210.", - "testString": "assert.strictEqual(euler40(), 210, 'euler40() should return 210.');" + "text": "champernownesConstant(100) should return 5.", + "testString": "assert.strictEqual(champernownesConstant(100), 5, 'champernownesConstant(100) should return 5.');" + }, + { + "text": "champernownesConstant(1000) should return 15.", + "testString": "assert.strictEqual(champernownesConstant(1000), 15, 'champernownesConstant(1000) should return 15.');" + }, + { + "text": "champernownesConstant(1000000) should return 210.", + "testString": "assert.strictEqual(champernownesConstant(1000000), 210, 'champernownesConstant(1000000) should return 210.');" } ], - "solutions": [], + "solutions": [ + "function champernownesConstant(n) {\n let fractionalPart = '';\n for (let i = 0; fractionalPart.length <= n; i++) {\n fractionalPart += i.toString();\n }\n\n let product = 1;\n for (let i = 0; i < n.toString().length; i++) {\n const index = 10 ** i;\n product *= parseInt(fractionalPart[index], 10);\n }\n\n return product;\n}" + ], "translations": {}, "description": [ "An irrational decimal fraction is created by concatenating the positive integers:", - "0.123456789101112131415161718192021...", - "It can be seen that the 12th digit of the fractional part is 1.", - "If dn represents the nth digit of the fractional part, find the value of the following expression.", - "d1 × d10 × d100 × d1000 × d10000 × d100000 × d1000000" + "0.123456789101112131415161718192021...", + "It can be seen that the 12th digit of the fractional part is 1.", + "If dn represents the nth digit of the fractional part, find the value of the following expression.", + "d1 × d10 × d100 × d1000 × d10000 × d100000 × d1000000" ], "files": { "indexjs": { @@ -2113,15 +2245,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler40() {", + "function champernownesConstant(n) {", " // Good luck!", " return true;", "}", "", - "euler40();" + "champernownesConstant(100);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2135,24 +2267,18 @@ "text": "pandigitalPrime(4) should return 4231.", "testString": "assert(pandigitalPrime(4) == 4231, 'pandigitalPrime(4) should return 4231.');" }, - { - "text": "pandigitalPrime(5) should return 0.", - "testString": "assert(pandigitalPrime(5) == 0, 'pandigitalPrime(5) should return 0.');" - }, - { - "text": "pandigitalPrime(6) should return 0.", - "testString": "assert(pandigitalPrime(6) == 0, 'pandigitalPrime(6) should return 0.');" - }, { "text": "pandigitalPrime(7) should return 7652413.", "testString": "assert(pandigitalPrime(7) == 7652413, 'pandigitalPrime(7) should return 7652413.');" } ], - "solutions": [], + "solutions": [ + "function pandigitalPrime(n) {\n function isPrime(num) {\n for (let i = 2, s = Math.sqrt(num); i <= s; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return num !== 1;\n }\n\n function getPermutations(n) {\n if (n === 1) {\n permutations.push(digitsArr.join(''));\n } else {\n for (let i = 0; i < n - 1; i++) {\n getPermutations(n - 1);\n // swap(n % 2 === 0 ? i : 0, n - 1);\n if (n % 2 === 0) {\n swap(i, n - 1);\n } else {\n swap(0, n - 1);\n }\n }\n getPermutations(n - 1);\n }\n }\n function swap(x, y) {\n let temp = digitsArr[x];\n digitsArr[x] = digitsArr[y];\n digitsArr[y] = temp;\n }\n let max = 0;\n let permutations = [];\n let digitsArr;\n let pandigitalNum = '';\n\n for (let max = n; max > 0; max--) {\n pandigitalNum += max;\n }\n\n for (let i = 0; i < pandigitalNum.length; i++) {\n if (max > 0) {\n break;\n } else {\n permutations = [];\n const currMax = pandigitalNum.slice(i);\n digitsArr = currMax.split('');\n getPermutations(digitsArr.length);\n\n // sort permutations in descending order\n permutations.sort(function(a, b) {\n return b - a;\n });\n\n for (let perm of permutations) {\n const thisPerm = parseInt(perm);\n if (isPrime(thisPerm)) {\n max = thisPerm;\n break;\n }\n }\n }\n }\n\n return max;\n}" + ], "translations": {}, "description": [ - "We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime.", - "What is the largest n-length digit pandigital prime that exists?" + "We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime.", + "What is the largest n-length digit pandigital prime that exists?" ], "files": { "indexjs": { @@ -2167,8 +2293,8 @@ "", "pandigitalPrime(7);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2219,8 +2345,8 @@ "", "codedTriangleNumbers(1786);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2262,8 +2388,8 @@ "", "substringDivisibility();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2274,17 +2400,19 @@ "title": "Problem 44: Pentagon numbers", "tests": [ { - "text": "euler44() should return 5482660.", - "testString": "assert.strictEqual(euler44(), 5482660, 'euler44() should return 5482660.');" + "text": "pentagonNumbers() should return 5482660.", + "testString": "assert.strictEqual(pentagonNumbers(), 5482660, 'pentagonNumbers() should return 5482660.');" } ], - "solutions": [], + "solutions": [ + "function pentagonNumbers() {\n function isPentagonal(num) {\n // Formula found by solving pentagonal number\n // equation for n.\n const n = (Math.sqrt((24 * num) + 1) + 1) / 6;\n return n % 1 === 0;\n }\n\n function pentagonal(num) {\n return (num * ((3 * num) - 1)) / 2;\n }\n let result;\n let i = 1;\n while (!result) {\n i++;\n const num1 = (i * ((3 * i) - 1)) / 2; // Pentagonal num formula\n const minDiff = num1 - (((i - 1) * ((3 * (i - 1)) - 1)) / 2);\n let j = i - 1;\n while (j > 0 && !result) {\n const num2 = (j * ((3 * j) - 1)) / 2;\n if (isPentagonal(num1 - num2) && isPentagonal(num1 + num2)) {\n result = num1 - num2;\n }\n j--;\n }\n }\n return result;\n }" + ], "translations": {}, "description": [ - "Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers are:", - "1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ...", - "It can be seen that P4 + P7 = 22 + 70 = 92 = P8. However, their difference, 70 − 22 = 48, is not pentagonal.", - "Find the pair of pentagonal numbers, Pj and Pk, for which their sum and difference are pentagonal and D = |Pk − Pj| is minimised; what is the value of D?" + "Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers are:", + "1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ...", + "It can be seen that P4 + P7 = 22 + 70 = 92 = P8. However, their difference, 70 − 22 = 48, is not pentagonal.", + "Find the pair of pentagonal numbers, Pj and Pk, for which their sum and difference are pentagonal and D = |Pk − Pj| is minimised; what is the value of D?" ], "files": { "indexjs": { @@ -2292,15 +2420,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler44() {", + "function pentagonNumbers() {", " // Good luck!", " return true;", "}", "", - "euler44();" + "pentagonNumbers();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2311,30 +2439,20 @@ "title": "Problem 45: Triangular, pentagonal, and hexagonal", "tests": [ { - "text": "euler45() should return 1533776805.", - "testString": "assert.strictEqual(euler45(), 1533776805, 'euler45() should return 1533776805.');" + "text": "triPentaHexa(40756) should return 1533776805.", + "testString": "assert.strictEqual(triPentaHexa(40756), 1533776805, 'triPentaHexa(40756) should return 1533776805.');" } ], - "solutions": [], + "solutions": [ + "function triPentaHexa(n) {\n function triangular(num) {\n return (num * (num + 1)) / 2;\n}\n\nfunction isPentagonal(num) {\n // Formula found by completing the square and\n // solving for n.\n const n = (Math.sqrt((24 * num) + 1) + 1) / 6;\n return n % 1 === 0;\n}\n\n function isHexagonal(num) {\n // Formula found by completing the square and\n // solving for n.\n const n = Math.sqrt(0.5 * (num + (1 / 8))) + 0.25;\n return n % 1 === 0;\n}\n\nlet iTri = n;\nlet tri;\nlet found = false;\nwhile (!found) {\n iTri++;\n tri = triangular(iTri);\n if (isPentagonal(tri) && isHexagonal(tri)) {\n found = true;\n }\n }\n return tri;\n}" + ], "translations": {}, "description": [ "Triangle, pentagonal, and hexagonal numbers are generated by the following formulae:", - "Triangle", - " ", - "Tn=n(n+1)/2", - " ", - "1, 3, 6, 10, 15, ...", - "Pentagonal", - " ", - "Pn=n(3n−1)/2", - " ", - "1, 5, 12, 22, 35, ...", - "Hexagonal", - " ", - "Hn=n(2n−1)", - " ", - "1, 6, 15, 28, 45, ...", - "It can be verified that T285 = P165 = H143 = 40755.", + "
      Triangle
      Tn=n(n+1)/2
      1, 3, 6, 10, 15, ...
      ", + "
      Pentagonal
      Pn=n(3n−1)/2
      1, 5, 12, 22, 35, ...
      ", + "
      Hexagonal
      Hn=n(2n−1)
      1, 6, 15, 28, 45, ...
      ", + "It can be verified that T285 = P165 = H143 = 40755.", "Find the next triangle number that is also pentagonal and hexagonal." ], "files": { @@ -2343,15 +2461,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler45() {", + "function triPentaHexa(n) {", " // Good luck!", " return true;", "}", "", - "euler45();" + "triPentaHexa(40756);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2362,20 +2480,22 @@ "title": "Problem 46: Goldbach's other conjecture", "tests": [ { - "text": "euler46() should return 5777.", - "testString": "assert.strictEqual(euler46(), 5777, 'euler46() should return 5777.');" + "text": "goldbachsOtherConjecture() should return 5777.", + "testString": "assert.strictEqual(goldbachsOtherConjecture(), 5777, 'goldbachsOtherConjecture() should return 5777.');" } ], - "solutions": [], + "solutions": [ + "function goldbachsOtherConjecture() { function isPrime(num) {\n if (num < 2) {\n return false;\n } else if (num === 2) {\n return true;\n }\n const sqrtOfNum = Math.floor(num ** 0.5);\n for (let i = 2; i <= sqrtOfNum + 1; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return true;\n }\n\n function isSquare(num) {\n return Math.sqrt(num) % 1 === 0;\n }\n\n // construct a list of prime numbers\n const primes = [];\n for (let i = 2; primes.length < 1000; i++) {\n if (isPrime(i)) primes.push(i);\n }\n\n let num = 3;\n let answer;\n while (!answer) {\n num += 2;\n if (!isPrime(num)) {\n let found = false;\n for (let primeI = 0; primeI < primes.length && !found; primeI++) {\n const square = (num - primes[primeI]) / 2;\n if (isSquare(square)) {\n found = true;\n break;\n }\n }\n if (!found) answer = num;\n }\n }\n return answer;\n}" + ], "translations": {}, "description": [ "It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square.", - "9 = 7 + 2×12", - "15 = 7 + 2×22", - "21 = 3 + 2×32", - "25 = 7 + 2×32", - "27 = 19 + 2×22", - "33 = 31 + 2×12", + "9 = 7 + 2×12", + "15 = 7 + 2×22", + "21 = 3 + 2×32", + "25 = 7 + 2×32", + "27 = 19 + 2×22", + "33 = 31 + 2×12", "It turns out that the conjecture was false.", "What is the smallest odd composite that cannot be written as the sum of a prime and twice a square?" ], @@ -2385,15 +2505,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler46() {", + "function goldbachsOtherConjecture() {", " // Good luck!", " return true;", "}", "", - "euler46();" + "goldbachsOtherConjecture();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2404,17 +2524,30 @@ "title": "Problem 47: Distinct primes factors", "tests": [ { - "text": "euler47() should return 134043.", - "testString": "assert.strictEqual(euler47(), 134043, 'euler47() should return 134043.');" + "text": "distinctPrimeFactors(2, 2) should return 14.", + "testString": "assert.strictEqual(distinctPrimeFactors(2, 2), 14, 'distinctPrimeFactors(2, 2) should return 14.');" + }, + { + "text": "distinctPrimeFactors(3, 3) should return 644.", + "testString": "assert.strictEqual(distinctPrimeFactors(3, 3), 644, 'distinctPrimeFactors(3, 3) should return 644.');" + }, + { + "text": "distinctPrimeFactors(4, 4) should return 134043.", + "testString": "assert.strictEqual(distinctPrimeFactors(4, 4), 134043, 'distinctPrimeFactors(4, 4) should return 134043.');" } ], - "solutions": [], + "solutions": [ + "function distinctPrimeFactors(targetNumPrimes, targetConsecutive) {\n\n function isPrime(num) {\n for (let i = 2, s = Math.sqrt(num); i <= s; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return num !== 1;\n }\n\n function getPrimeFactors(num) {\n const factors = [];\n for (let i = 2; i <= Math.sqrt(num); i++) {\n if (num % i === 0) {\n // found a factor\n if (isPrime(i)) {\n factors.push(i);\n }\n if (isPrime(num / i) && i !== Math.sqrt(num)) {\n factors.push(num / i);\n }\n }\n }\n return factors;\n }\n\n function findConsecutiveNumbers() {\n let number = 0;\n let consecutive = 0;\n while (consecutive < targetConsecutive) {\n number++;\n if (getPrimeFactors(number).length >= targetNumPrimes) {\n consecutive++;\n } else {\n consecutive = 0;\n }\n }\n return (number - targetConsecutive) + 1;\n }\n\n return findConsecutiveNumbers();\n }" + ], "translations": {}, "description": [ "The first two consecutive numbers to have two distinct prime factors are:", - "14 = 2 × 715 = 3 × 5", + "
      14 = 2 × 7
      ", + "
      15 = 3 × 5
      ", "The first three consecutive numbers to have three distinct prime factors are:", - "644 = 2² × 7 × 23645 = 3 × 5 × 43646 = 2 × 17 × 19.", + "
      644 = 2² × 7 × 23
      ", + "
      645 = 3 × 5 × 43
      ", + "
      646 = 2 × 17 × 19
      ", "Find the first four consecutive integers to have four distinct prime factors each. What is the first of these numbers?" ], "files": { @@ -2423,15 +2556,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler47() {", + "function distinctPrimeFactors(targetNumPrimes, targetConsecutive) {", " // Good luck!", " return true;", "}", "", - "euler47();" + "distinctPrimeFactors(4, 4);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2442,15 +2575,29 @@ "title": "Problem 48: Self powers", "tests": [ { - "text": "euler48() should return 9110846700.", - "testString": "assert.strictEqual(euler48(), 9110846700, 'euler48() should return 9110846700.');" + "text": "selfPowers(10, 3) should return 317.", + "testString": "assert.strictEqual(selfPowers(10, 3), 317, 'selfPowers(10, 3) should return 317.');" + }, + { + "text": "selfPowers(150, 6) should return 29045.", + "testString": "assert.strictEqual(selfPowers(150, 6), 29045, 'selfPowers(150, 6) should return 29045.');" + }, + { + "text": "selfPowers(673, 7) should return 2473989.", + "testString": "assert.strictEqual(selfPowers(673, 7), 2473989, 'selfPowers(673, 7) should return 2473989.');" + }, + { + "text": "selfPowers(1000, 10) should return 9110846700.", + "testString": "assert.strictEqual(selfPowers(1000, 10), 9110846700, 'selfPowers(1000, 10) should return 9110846700.');" } ], - "solutions": [], + "solutions": [ + "function selfPowers(power, lastDigits) {\n let sum = 0;\n const modulo = Math.pow(10, lastDigits);\n\n for (let i = 1; i <= power; i++) {\n let temp = i;\n for (let j = 1; j < i; j++) {\n temp *= i;\n temp %= modulo;\n }\n\n sum += temp;\n sum %= modulo;\n }\n\n return sum;\n}" + ], "translations": {}, "description": [ - "The series, 11 + 22 + 33 + ... + 1010 = 10405071317.", - "Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000." + "The series, 11 + 22 + 33 + ... + 1010 = 10405071317.", + "Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000." ], "files": { "indexjs": { @@ -2458,15 +2605,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler48() {", + "function selfPowers(power, lastDigits) {", " // Good luck!", " return true;", "}", "", - "euler48();" + "selfPowers(1000, 10);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2477,11 +2624,13 @@ "title": "Problem 49: Prime permutations", "tests": [ { - "text": "euler49() should return 296962999629.", - "testString": "assert.strictEqual(euler49(), 296962999629, 'euler49() should return 296962999629.');" + "text": "primePermutations() should return 296962999629.", + "testString": "assert.strictEqual(primePermutations(), 296962999629, 'primePermutations() should return 296962999629.');" } ], - "solutions": [], + "solutions": [ + "function primePermutations() {\n function arePermutations(num1, num2) {\n const numStr1 = num1.toString();\n let numStr2 = num2.toString();\n if (numStr1.length !== numStr2.length) {\n return false;\n }\n\n for (let i = 0; i < numStr1.length; i++) {\n const index = numStr2.indexOf(numStr1[i]);\n if (index === -1) {\n return false;\n }\n numStr2 = numStr2.slice(0, index) + numStr2.slice(index + 1);\n }\n return true;\n }\n\n function isPrime(num) {\n if (num < 2) {\n return false;\n } else if (num === 2) {\n return true;\n }\n const sqrtOfNum = Math.floor(num ** 0.5);\n for (let i = 2; i <= sqrtOfNum + 1; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return true;\n }\n\n for (let num1 = 1000; num1 <= 9999; num1++) {\n const num2 = num1 + 3330;\n const num3 = num2 + 3330;\n if (isPrime(num1) && isPrime(num2) && isPrime(num3)) {\n if (arePermutations(num1, num2) && arePermutations(num1, num3)\n && num1 !== 1487) {\n // concatenate and return numbers\n return (num1 * 100000000) + (num2 * 10000) + num3;\n }\n }\n }\n return 0;\n}" + ], "translations": {}, "description": [ "The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another.", @@ -2494,15 +2643,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler49() {", + "function primePermutations() {", " // Good luck!", " return true;", "}", "", - "euler49();" + "primePermutations();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2513,11 +2662,17 @@ "title": "Problem 50: Consecutive prime sum", "tests": [ { - "text": "euler50() should return 997651.", - "testString": "assert.strictEqual(euler50(), 997651, 'euler50() should return 997651.');" + "text": "consecutivePrimeSum(1000) should return 953.", + "testString": "assert.strictEqual(consecutivePrimeSum(1000), 953, 'consecutivePrimeSum(1000) should return 953.');" + }, + { + "text": "consecutivePrimeSum(1000000) should return 997651.", + "testString": "assert.strictEqual(consecutivePrimeSum(1000000), 997651, 'consecutivePrimeSum(1000000) should return 997651.');" } ], - "solutions": [], + "solutions": [ + "function consecutivePrimeSum(limit) {\n function isPrime(num) {\n if (num < 2) {\n return false;\n } else if (num === 2) {\n return true;\n }\n const sqrtOfNum = Math.floor(num ** 0.5);\n for (let i = 2; i <= sqrtOfNum + 1; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return true;\n }\n function getPrimes(limit) {\n const primes = [];\n for (let i = 0; i <= limit; i++) {\n if (isPrime(i)) primes.push(i);\n }\n return primes;\n }\n\n const primes = getPrimes(limit);\n let primeSum = [...primes];\n primeSum.reduce((acc, n, i) => {\n primeSum[i] += acc;\n return acc += n;\n }, 0);\n\n for (let j = primeSum.length - 1; j >= 0; j--) {\n for (let i = 0; i < j; i++) {\n const sum = primeSum[j] - primeSum[i];\n if (sum > limit) break;\n if (isPrime(sum) && primes.indexOf(sum) > -1) return sum;\n }\n }\n}" + ], "translations": {}, "description": [ "The prime 41, can be written as the sum of six consecutive primes:", @@ -2532,15 +2687,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler50() {", + "function consecutivePrimeSum(limit) {", " // Good luck!", " return true;", "}", "", - "euler50();" + "consecutivePrimeSum(1000000);" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2575,8 +2730,8 @@ "", "euler51();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2610,8 +2765,8 @@ "", "euler52();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2654,8 +2809,8 @@ "", "euler53();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2711,8 +2866,8 @@ "", "euler54();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2754,8 +2909,8 @@ "", "euler55();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2789,8 +2944,8 @@ "", "euler56();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2831,8 +2986,8 @@ "", "euler57();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2873,8 +3028,8 @@ "", "euler58();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2911,8 +3066,8 @@ "", "euler59();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2946,8 +3101,8 @@ "", "euler60();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2967,34 +3122,34 @@ "description": [ "Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers and are generated by the following formulae:", "Triangle", - " ", + "", "P3,n=n(n+1)/2", - " ", + "", "1, 3, 6, 10, 15, ...", "Square", - " ", + "", "P4,n=n2", - " ", + "", "1, 4, 9, 16, 25, ...", "Pentagonal", - " ", + "", "P5,n=n(3n−1)/2", - " ", + "", "1, 5, 12, 22, 35, ...", "Hexagonal", - " ", + "", "P6,n=n(2n−1)", - " ", + "", "1, 6, 15, 28, 45, ...", "Heptagonal", - " ", + "", "P7,n=n(5n−3)/2", - " ", + "", "1, 7, 18, 34, 55, ...", "Octagonal", - " ", + "", "P8,n=n(3n−2)", - " ", + "", "1, 8, 21, 40, 65, ...", "The ordered set of three 4-digit numbers: 8128, 2882, 8281, has three interesting properties.", "The set is cyclic, in that the last two digits of each number is the first two digits of the next number (including the last number with the first).", @@ -3015,8 +3170,8 @@ "", "euler61();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3050,8 +3205,8 @@ "", "euler62();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3085,8 +3240,8 @@ "", "euler63();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3108,16 +3263,16 @@ "", "√N = a0 +", "1", - " ", + "", "a1 +", "1", - " ", - " ", + "", + "", "a2 +", "1", - " ", - " ", - " ", + "", + "", + "", "a3 + ...", "", "For example, let us consider √23:", @@ -3126,9 +3281,9 @@ "1", " = 4 + ", "1", - " ", + "", "1√23—4", - " ", + "", "1 + ", "√23 – 37", "", @@ -3136,77 +3291,77 @@ "", "√23 = 4 +", "1", - " ", + "", "1 +", "1", - " ", - " ", + "", + "", "3 +", "1", - " ", - " ", - " ", + "", + "", + "", "1 +", "1", - " ", - " ", - " ", - " ", + "", + "", + "", + "", "8 + ...", "", "The process can be summarised as follows:", "", "a0 = 4,", - " ", + "", "1√23—4", " = ", "√23+47", " = 1 + ", "√23—37", "a1 = 1,", - " ", + "", "7√23—3", " = ", "7(√23+3)14", " = 3 + ", "√23—32", "a2 = 3,", - " ", + "", "2√23—3", " = ", "2(√23+3)14", " = 1 + ", "√23—47", "a3 = 1,", - " ", + "", "7√23—4", " = ", "7(√23+4)7", " = 8 + ", "√23—4", "a4 = 8,", - " ", + "", "1√23—4", " = ", "√23+47", " = 1 + ", "√23—37", "a5 = 1,", - " ", + "", "7√23—3", " = ", "7(√23+3)14", " = 3 + ", "√23—32", "a6 = 3,", - " ", + "", "2√23—3", " = ", "2(√23+3)14", " = 1 + ", "√23—47", "a7 = 1,", - " ", + "", "7√23—4", " = ", "7(√23+4)7", @@ -3242,8 +3397,8 @@ "", "euler64();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3265,22 +3420,22 @@ "", "√2 = 1 +", "1", - " ", + "", "2 +", "1", - " ", - " ", + "", + "", "2 +", "1", - " ", - " ", - " ", + "", + "", + "", "2 +", "1", - " ", - " ", - " ", - " ", + "", + "", + "", + "", "2 + ...", "", "The infinite continued fraction can be written, √2 = [1;(2)], (2) indicates that 2 repeats ad infinitum. In a similar way, √23 = [4;(1,3,1,8)].", @@ -3290,59 +3445,59 @@ "1 +", "1", "= 3/2", - " ", + "", "2", - " ", + "", "1 +", "1", "= 7/5", - " ", + "", "2 +", "1", - " ", - " ", + "", + "", "2", - " ", + "", "1 +", "1", "= 17/12", - " ", + "", "2 +", "1", - " ", - " ", - " ", + "", + "", + "", "2 +", "1", - " ", - " ", - " ", - " ", + "", + "", + "", + "", "2", - " ", + "", "1 +", "1", "= 41/29", - " ", + "", "2 +", "1", - " ", - " ", + "", + "", "2 +", "1", - " ", - " ", - " ", - " ", + "", + "", + "", + "", "2 +", "1", - " ", - " ", - " ", - " ", - " ", + "", + "", + "", + "", + "", "2", - " ", + "", "", "Hence the sequence of the first ten convergents for √2 are:", "1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, ...", @@ -3365,8 +3520,8 @@ "", "euler65();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3409,8 +3564,8 @@ "", "euler66();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3449,8 +3604,8 @@ "", "euler67();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3500,8 +3655,8 @@ "", "euler68();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3578,8 +3733,8 @@ "", "euler69();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3614,8 +3769,8 @@ "", "euler70();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3652,8 +3807,8 @@ "", "euler71();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3690,8 +3845,8 @@ "", "euler72();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3728,8 +3883,8 @@ "", "euler73();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3773,8 +3928,8 @@ "", "euler74();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3811,8 +3966,8 @@ "", "euler75();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3852,8 +4007,8 @@ "", "euler76();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3892,8 +4047,8 @@ "", "euler77();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3936,8 +4091,8 @@ "", "euler78();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3972,8 +4127,8 @@ "", "euler79();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4008,8 +4163,8 @@ "", "euler80();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4054,8 +4209,8 @@ "", "euler81();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4101,8 +4256,8 @@ "", "euler82();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4149,8 +4304,8 @@ "", "euler83();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4182,31 +4337,31 @@ "B3", "JAIL", "H2", - " ", + "", "C1", "T2", - " ", + "", "U1", "H1", - " ", + "", "C2", "CH3", - " ", + "", "C3", "R4", - " ", + "", "R2", "G3", - " ", + "", "D1", "CC3", - " ", + "", "CC2", "G2", - " ", + "", "D2", "G1", - " ", + "", "D3", "G2J", "F3", @@ -4257,8 +4412,8 @@ "", "euler84();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4294,8 +4449,8 @@ "", "euler85();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4333,8 +4488,8 @@ "", "euler86();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4372,8 +4527,8 @@ "", "euler87();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4412,8 +4567,8 @@ "", "euler88();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4457,8 +4612,8 @@ "", "euler89();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4511,8 +4666,8 @@ "", "euler90();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4555,8 +4710,8 @@ "", "euler91();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4594,8 +4749,8 @@ "", "euler92();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4636,8 +4791,8 @@ "", "euler93();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4672,8 +4827,8 @@ "", "euler94();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4711,8 +4866,8 @@ "", "euler95();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4773,8 +4928,8 @@ "", "euler96();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4809,8 +4964,8 @@ "", "euler97();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4846,8 +5001,8 @@ "", "euler98();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4883,8 +5038,8 @@ "", "euler99();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4919,8 +5074,8 @@ "", "euler100();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -4973,8 +5128,8 @@ "", "euler101();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5013,8 +5168,8 @@ "", "euler102();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5055,8 +5210,8 @@ "", "euler103();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5092,8 +5247,8 @@ "", "euler104();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5131,8 +5286,8 @@ "", "euler105();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5171,8 +5326,8 @@ "", "euler106();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5220,8 +5375,8 @@ "", "euler107();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5229,17 +5384,21 @@ "id": "5900f3d91000cf542c50feeb", "challengeType": 5, "type": "bonfire", - "title": "Problem 108: About Project Euler", + "title": "Problem 108: Diophantine Reciprocals I", "tests": [ { - "text": "euler108() should return 180180.", - "testString": "assert.strictEqual(euler108(), 180180, 'euler108() should return 180180.');" + "text": "diophantineOne() should return 180180.", + "testString": "assert.strictEqual(diophantineOne(), 180180, 'diophantineOne() should return 180180.');" } ], "solutions": [], "translations": {}, "description": [ - "" + "In the following equation x, y, and n are positive integers.", + "1/x + 1/y = 1/n", + "For n = 4 there are exactly three distinct solutions:", + "1/5 + 1/20 = 1/4
      1/6 + 1/12 = 1/4
      1/8 + 1/8 = 1/4", + "What is the least value of n for which the number of distinct solutions exceeds one-thousand?" ], "files": { "indexjs": { @@ -5247,15 +5406,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler108() {", + "function diophantineOne() {", " // Good luck!", " return true;", "}", "", - "euler108();" + "diophantineOne();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5283,20 +5442,20 @@ "There are exactly eleven distinct ways to checkout on a score of 6:", "", "D3", - " ", - " ", + "", + "", "D1", "D2", - " ", + "", "S2", "D2", - " ", + "", "D2", "D1", - " ", + "", "S4", "D1", - " ", + "", "S1", "S1", "D2", @@ -5334,8 +5493,8 @@ "", "euler109();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5343,17 +5502,20 @@ "id": "5900f3db1000cf542c50feed", "challengeType": 5, "type": "bonfire", - "title": "Problem 110: About Project Euler", + "title": "Problem 110: Diophantine Reciprocals II", "tests": [ { - "text": "euler110() should return 9350130049860600.", - "testString": "assert.strictEqual(euler110(), 9350130049860600, 'euler110() should return 9350130049860600.');" + "text": "diophantineTwo should return 9350130049860600.", + "testString": "assert.strictEqual(diophantineTwo(), 9350130049860600, 'diophantineTwo() should return 9350130049860600.');" } ], "solutions": [], "translations": {}, "description": [ - "" + "In the following equation x, y, and n are positive integers.", + "1/x + 1/y = 1/n", + "It can be verified that when n = 1260 there are 113 distinct solutions and this is the least value of n for which the total number of distinct solutions exceeds one hundred.", + "What is the least value of n for which the number of distinct solutions exceeds four million?" ], "files": { "indexjs": { @@ -5361,15 +5523,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler110() {", + "function diophantineTwo() {", " // Good luck!", " return true;", "}", "", - "euler110();" + "diophantineTwo();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5454,8 +5616,8 @@ "", "euler111();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5493,8 +5655,8 @@ "", "euler112();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5531,8 +5693,8 @@ "", "euler113();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5651,7 +5813,7 @@ "", "", "", - " ", + "", "How many ways can a row measuring fifty units in length be filled?", "NOTE: Although the example above does not lend itself to the possibility, in general it is permitted to mix block sizes. For example, on a row measuring eight units in length you could use red (3), black (1), and red (4)." ], @@ -5668,8 +5830,8 @@ "", "euler114();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5708,8 +5870,8 @@ "", "euler115();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5769,7 +5931,7 @@ "", "", "", - " ", + "", "If green tiles are chosen there are three ways.", "", "", @@ -5787,7 +5949,7 @@ "", "", "", - " ", + "", "And if blue tiles are chosen there are two ways.", "", "", @@ -5815,8 +5977,8 @@ "", "euler116();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5913,7 +6075,7 @@ "", "", "", - " ", + "", "How many ways can a row measuring fifty units in length be tiled?", "NOTE: This is related to Problem 116." ], @@ -5930,8 +6092,8 @@ "", "euler117();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -5965,8 +6127,8 @@ "", "euler118();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6002,8 +6164,8 @@ "", "euler119();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6038,8 +6200,8 @@ "", "euler120();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6075,8 +6237,8 @@ "", "euler121();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6116,8 +6278,8 @@ "", "euler122();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6153,8 +6315,8 @@ "", "euler123();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6175,7 +6337,7 @@ "The radical of n, rad(n), is the product of the distinct prime factors of n. For example, 504 = 23 × 32 × 7, so rad(504) = 2 × 3 × 7 = 42.", "If we calculate rad(n) for 1 ≤ n ≤ 10, then sort them on rad(n), and sorting on n if the radical values are equal, we get:", "Unsorted", - " ", + "", "Sorted", "n", "rad(n)", @@ -6184,34 +6346,34 @@ "rad(n)", "k", "11", - " ", + "", "111", "22", - " ", + "", "222", "33", - " ", + "", "423", "42", - " ", + "", "824", "55", - " ", + "", "335", "66", - " ", + "", "936", "77", - " ", + "", "557", "82", - " ", + "", "668", "93", - " ", + "", "779", "1010", - " ", + "", "101010", "Let E(k) be the kth element in the sorted n column; for example, E(4) = 8 and E(6) = 9.", "If rad(n) is sorted for 1 ≤ n ≤ 100000, find E(10000)." @@ -6229,8 +6391,8 @@ "", "euler124();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6265,8 +6427,8 @@ "", "euler125();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6306,8 +6468,8 @@ "", "euler126();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6352,8 +6514,8 @@ "", "euler127();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6395,8 +6557,8 @@ "", "euler128();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6432,8 +6594,8 @@ "", "euler129();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6470,8 +6632,8 @@ "", "euler130();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6507,8 +6669,8 @@ "", "euler131();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6543,8 +6705,8 @@ "", "euler132();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6580,8 +6742,8 @@ "", "euler133();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6616,8 +6778,8 @@ "", "euler134();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6653,8 +6815,8 @@ "", "euler135();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6690,8 +6852,8 @@ "", "euler136();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6714,10 +6876,10 @@ "Surprisingly AF(1/2)", " = ", "(1/2).1 + (1/2)2.1 + (1/2)3.2 + (1/2)4.3 + (1/2)5.5 + ...", - " ", + "", " = ", "1/2 + 1/4 + 2/8 + 3/16 + 5/32 + ...", - " ", + "", " = ", "2", "The corresponding values of x for the first five natural numbers are shown below.", @@ -6745,8 +6907,8 @@ "", "euler137();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6784,8 +6946,8 @@ "", "euler138();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6823,8 +6985,8 @@ "", "euler139();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6869,8 +7031,8 @@ "", "euler140();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6907,8 +7069,8 @@ "", "euler141();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6941,8 +7103,8 @@ "", "euler142();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -6980,8 +7142,8 @@ "", "euler143();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7023,8 +7185,8 @@ "", "euler144();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7061,8 +7223,8 @@ "", "euler145();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7097,8 +7259,8 @@ "", "euler146();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7142,8 +7304,8 @@ "", "euler147();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7162,75 +7324,75 @@ "translations": {}, "description": [ "We can easily verify that none of the entries in the first seven rows of Pascal's triangle are divisible by 7:", - " ", - " ", - " ", - " ", - " ", - " ", + "", + "", + "", + "", + "", + "", " 1", - " ", - " ", - " ", - " ", - " ", + "", + "", + "", + "", + "", " 1", - " ", + "", " 1", - " ", - " ", - " ", - " ", + "", + "", + "", + "", " 1", - " ", + "", " 2", - " ", + "", " 1", - " ", - " ", - " ", + "", + "", + "", " 1", - " ", + "", " 3", - " ", + "", " 3", - " ", + "", " 1", - " ", - " ", + "", + "", " 1", - " ", + "", " 4", - " ", + "", " 6", - " ", + "", " 4", - " ", + "", " 1", - " ", + "", " 1", - " ", + "", " 5", - " ", + "", "10", - " ", + "", "10", - " ", + "", " 5", - " ", + "", " 1", "1", - " ", + "", " 6", - " ", + "", "15", - " ", + "", "20", - " ", + "", "15", - " ", + "", " 6", - " ", + "", " 1", "However, if we check the first one hundred rows, we will find that only 2361 of the 5050 entries are not divisible by 7.", "", @@ -7249,8 +7411,8 @@ "", "euler148();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7299,8 +7461,8 @@ "", "euler149();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7358,8 +7520,8 @@ "", "euler150();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7399,8 +7561,8 @@ "", "euler151();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7437,8 +7599,8 @@ "", "euler152();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7515,8 +7677,8 @@ "", "euler153();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7556,8 +7718,8 @@ "", "euler154();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7599,8 +7761,8 @@ "", "euler155();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7665,8 +7827,8 @@ "", "euler156();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7721,8 +7883,8 @@ "", "euler157();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7762,8 +7924,8 @@ "", "euler158();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7821,8 +7983,8 @@ "", "euler159();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7860,8 +8022,8 @@ "", "euler160();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7908,8 +8070,8 @@ "", "euler161();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7949,8 +8111,8 @@ "", "euler162();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -7990,8 +8152,8 @@ "", "euler163();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8024,8 +8186,8 @@ "", "euler164();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8075,8 +8237,8 @@ "", "euler165();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8121,8 +8283,8 @@ "", "euler166();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8160,8 +8322,8 @@ "", "euler167();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8197,8 +8359,8 @@ "", "euler168();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8237,8 +8399,8 @@ "", "euler169();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8280,8 +8442,8 @@ "", "euler170();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8318,8 +8480,8 @@ "", "euler171();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8352,8 +8514,8 @@ "", "euler172();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8390,8 +8552,8 @@ "", "euler173();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8430,8 +8592,8 @@ "", "euler174();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8473,8 +8635,8 @@ "", "euler175();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8508,8 +8670,8 @@ "", "euler176();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8547,8 +8709,8 @@ "", "euler177();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8586,8 +8748,8 @@ "", "euler178();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8620,8 +8782,8 @@ "", "euler179();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8662,8 +8824,8 @@ "", "euler180();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8699,8 +8861,8 @@ "", "euler181();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8747,8 +8909,8 @@ "", "euler182();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8796,8 +8958,8 @@ "", "euler183();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8836,8 +8998,8 @@ "", "euler184();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8907,8 +9069,8 @@ "", "euler185();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8953,8 +9115,8 @@ "", "euler186();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -8992,8 +9154,8 @@ "", "euler187();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9031,8 +9193,8 @@ "", "euler188();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9077,8 +9239,8 @@ "", "euler189();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9115,8 +9277,8 @@ "", "euler190();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9161,8 +9323,8 @@ "", "euler191();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9202,8 +9364,8 @@ "", "euler192();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9238,8 +9400,8 @@ "", "euler193();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9282,8 +9444,8 @@ "", "euler194();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9322,8 +9484,8 @@ "", "euler195();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9382,8 +9544,8 @@ "", "euler196();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9420,8 +9582,8 @@ "", "euler197();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9460,8 +9622,8 @@ "", "euler198();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9502,8 +9664,8 @@ "", "euler199();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9543,8 +9705,8 @@ "", "euler200();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9608,8 +9770,8 @@ "", "euler201();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9632,7 +9794,7 @@ "Label the vertices A, B and C. There are 2 ways in which a laser beam may enter vertex C, bounce off 11 surfaces, then exit through the same vertex: one way is shown below; the other is the reverse of that.", "", "", - " ", + "", "", "There are 80840 ways in which a laser beam may enter vertex C, bounce off 1000001 surfaces, then exit through the same vertex.", "", @@ -9651,8 +9813,8 @@ "", "euler202();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9698,8 +9860,8 @@ "", "euler203();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9739,8 +9901,8 @@ "", "euler204();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9778,8 +9940,8 @@ "", "euler205();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9812,8 +9974,8 @@ "", "euler206();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9867,8 +10029,8 @@ "", "euler207();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9908,8 +10070,8 @@ "", "euler208();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9952,8 +10114,8 @@ "", "euler209();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -9991,8 +10153,8 @@ "", "euler210();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10027,8 +10189,8 @@ "", "euler211();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10075,8 +10237,8 @@ "", "euler212();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10112,8 +10274,8 @@ "", "euler213();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10165,8 +10327,8 @@ "", "euler214();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10208,8 +10370,8 @@ "", "euler215();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10247,8 +10409,8 @@ "", "euler216();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10285,8 +10447,8 @@ "", "euler217();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10333,8 +10495,8 @@ "", "euler218();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10379,8 +10541,8 @@ "", "euler219();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10428,8 +10590,8 @@ "", "euler220();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10451,17 +10613,17 @@ "", "", " A = p · q · r    and  ", - " ", - " ", + "", + "", " 1A", " =", - " ", + "", " 1p", " +", - " ", + "", " 1q", " +", - " ", + "", " 1r", "For example, 630 is an Alexandrian integer (p = 5, q = −7, r = −18).", "In fact, 630 is the 6th Alexandrian integer, the first 6 Alexandrian integers being: 6, 42, 120, 156, 420 and 630.", @@ -10481,8 +10643,8 @@ "", "euler221();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10517,8 +10679,8 @@ "", "euler222();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10553,8 +10715,8 @@ "", "euler223();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10589,8 +10751,8 @@ "", "euler224();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10629,8 +10791,8 @@ "", "euler225();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10672,8 +10834,8 @@ "", "euler226();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10713,8 +10875,8 @@ "", "euler227();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10738,7 +10900,7 @@ "", " xk   =  ", " cos( 2k-1/n ×180° )", - " ", + "", " yk   =  ", " sin( 2k-1/n ×180° )", " Each Sn is to be interpreted as a filled shape consisting of all points on the perimeter and in the interior.", @@ -10769,8 +10931,8 @@ "", "euler228();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10821,8 +10983,8 @@ "", "euler229();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10881,8 +11043,8 @@ "", "euler230();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10919,8 +11081,8 @@ "", "euler231();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10959,8 +11121,8 @@ "", "euler232();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -10996,8 +11158,8 @@ "", "euler233();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11037,8 +11199,8 @@ "", "euler234();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11078,8 +11240,8 @@ "", "euler235();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11124,8 +11286,8 @@ "", "euler236();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11168,8 +11330,8 @@ "", "euler237();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11195,7 +11357,7 @@ " sn+1", " =", " sn2 mod 20300713", - " ", + "", "", "Concatenate these numbers  s0s1s2… to create a string w of infinite length.", "Then, w = 14025256741014958470038053646…", @@ -11235,8 +11397,8 @@ "", "euler238();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11274,8 +11436,8 @@ "", "euler239();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11319,8 +11481,8 @@ "", "euler240();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11361,8 +11523,8 @@ "", "euler241();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11403,8 +11565,8 @@ "", "euler242();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11445,8 +11607,8 @@ "", "euler243();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11504,8 +11666,8 @@ "", "euler244();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11548,8 +11710,8 @@ "", "euler245();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11600,8 +11762,8 @@ "", "euler246();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11649,8 +11811,8 @@ "", "euler247();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11684,8 +11846,8 @@ "", "euler248();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11720,8 +11882,8 @@ "", "euler249();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11754,8 +11916,8 @@ "", "euler250();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11798,8 +11960,8 @@ "", "euler251();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11837,7 +11999,7 @@ " Tn", " = ", " ( Sn mod 2000 ) − 1000 ", - " ", + "", "", "", "i.e. (527, 144), (−488, 732), (−454, −947), …", @@ -11858,8 +12020,8 @@ "", "euler252();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11910,8 +12072,8 @@ "", "euler253();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -11954,8 +12116,8 @@ "", "euler254();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12011,8 +12173,8 @@ "", "euler255();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12070,8 +12232,8 @@ "", "euler256();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12116,8 +12278,8 @@ "", "euler257();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12154,8 +12316,8 @@ "", "euler258();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12198,8 +12360,8 @@ "", "euler259();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12251,8 +12413,8 @@ "", "euler260();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12294,8 +12456,8 @@ "", "euler261();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12343,8 +12505,8 @@ "", "euler262();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12377,7 +12539,7 @@ "We shall call a number n such that :", "(n-9, n-3), (n-3,n+3), (n+3, n+9) form a triple-pair, and ", "the numbers n-8, n-4, n, n+4 and n+8 are all practical,", - " ", + "", "an engineers’ paradise.", "", "", @@ -12396,8 +12558,8 @@ "", "euler263();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12450,8 +12612,8 @@ "", "euler264();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12497,8 +12659,8 @@ "", "euler265();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12538,8 +12700,8 @@ "", "euler266();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12577,8 +12739,8 @@ "", "euler267();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12613,8 +12775,8 @@ "", "euler268();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12657,8 +12819,8 @@ "", "euler269();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12698,8 +12860,8 @@ "", "euler270();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12738,8 +12900,8 @@ "", "euler271();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12778,8 +12940,8 @@ "", "euler272();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12818,8 +12980,8 @@ "", "euler273();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12864,8 +13026,8 @@ "", "euler274();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12906,8 +13068,8 @@ "", "euler275();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -12942,8 +13104,8 @@ "", "euler276();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13000,8 +13162,8 @@ "", "euler277();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13044,8 +13206,8 @@ "", "euler278();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13078,8 +13240,8 @@ "", "euler279();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13117,8 +13279,8 @@ "", "euler280();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13159,8 +13321,8 @@ "", "euler281();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13200,8 +13362,8 @@ "", "euler282();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13240,8 +13402,8 @@ "", "euler283();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13281,8 +13443,8 @@ "", "euler284();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13324,8 +13486,8 @@ "", "euler285();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13362,8 +13524,8 @@ "", "euler286();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13411,8 +13573,8 @@ "", "euler287();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13460,8 +13622,8 @@ "", "euler288();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13508,8 +13670,8 @@ "", "euler289();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13542,8 +13704,8 @@ "", "euler290();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13579,8 +13741,8 @@ "", "euler291();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13620,8 +13782,8 @@ "", "euler292();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13666,8 +13828,8 @@ "", "euler293();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13711,8 +13873,8 @@ "", "euler294();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13767,8 +13929,8 @@ "", "euler295();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13806,8 +13968,8 @@ "", "euler296();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13850,8 +14012,8 @@ "", "euler297();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -13958,8 +14120,8 @@ "", "euler298();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14005,8 +14167,8 @@ "", "euler299();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14056,8 +14218,8 @@ "", "euler300();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14105,8 +14267,8 @@ "", "euler301();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14157,8 +14319,8 @@ "", "euler302();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14195,8 +14357,8 @@ "", "euler303();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14244,8 +14406,8 @@ "", "euler304();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14289,8 +14451,8 @@ "", "euler305();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14340,8 +14502,8 @@ "", "euler306();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14381,8 +14543,8 @@ "", "euler307();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14453,8 +14615,8 @@ "", "euler308();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14497,8 +14659,8 @@ "", "euler309();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14537,8 +14699,8 @@ "", "euler310();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14585,8 +14747,8 @@ "", "euler311();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14637,8 +14799,8 @@ "", "euler312();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14681,8 +14843,8 @@ "", "euler313();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14732,8 +14894,8 @@ "", "euler314();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14812,8 +14974,8 @@ "", "euler315();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14860,8 +15022,8 @@ "", "euler316();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14901,8 +15063,8 @@ "", "euler317();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -14961,8 +15123,8 @@ "", "euler318();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15010,8 +15172,8 @@ "", "euler319();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15052,8 +15214,8 @@ "", "euler320();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15100,8 +15262,8 @@ "", "euler321();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15138,8 +15300,8 @@ "", "euler322();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15179,8 +15341,8 @@ "", "euler323();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15216,8 +15378,8 @@ "", "euler324();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15274,8 +15436,8 @@ "", "euler325();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15321,8 +15483,8 @@ "", "euler326();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15376,8 +15538,8 @@ "", "euler327();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15432,8 +15594,8 @@ "", "euler328();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15477,8 +15639,8 @@ "", "euler329();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15527,12 +15689,12 @@ "", "", "It can be shown that a(n) is of the form ", - " ", + "", " A(n) e + B(n)n!", " for integers A(n) and B(n). ", - " ", + "", "For example a(10) = ", - " ", + "", " 328161643 e − 65269448610!", " .", "", @@ -15551,8 +15713,8 @@ "", "euler330();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15602,8 +15764,8 @@ "", "euler331();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15649,8 +15811,8 @@ "", "euler332();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15698,8 +15860,8 @@ "", "euler333();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15727,47 +15889,47 @@ "", "You are given the following sequences:", " t0 = 123456.", - " ", + "", "", " ti = ", - " ", - " ", - " ", - " ", - " ", + "", + "", + "", + "", + "", " ti-12", - " ", + "", " ,", - " ", - " ", - " ", + "", + "", + "", " if ti-1 is even", - " ", - " ", - " ", + "", + "", + "", " ti-12", - " ", - " ", - " ", + "", + "", + "", " 926252, ", - " ", - " ", + "", + "", " if ti-1 is odd", - " ", - " ", "", - " ", - " ", + "", + "", + "", + "", " where ⌊x⌋ is the floor function", - " ", "", - " ", - " ", + "", + "", + "", " and is the bitwise XOR operator.", - " ", + "", "", " bi = ( ti mod 211) + 1.", - " ", + "", "The first two terms of the last sequence are b1 = 289 and b2 = 145.", "If we start with b1 and b2 beans in two adjacent bowls, 3419100 moves would be required to finish the game.", "", @@ -15786,8 +15948,8 @@ "", "euler334();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15828,8 +15990,8 @@ "", "euler335();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15875,8 +16037,8 @@ "", "euler336();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15918,8 +16080,8 @@ "", "euler337();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -15969,8 +16131,8 @@ "", "euler338();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16012,8 +16174,8 @@ "", "euler339();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16058,8 +16220,8 @@ "", "euler340();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16100,8 +16262,8 @@ "", "euler341();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16142,8 +16304,8 @@ "", "euler342();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16197,8 +16359,8 @@ "", "euler343();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16251,8 +16413,8 @@ "", "euler344();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16310,8 +16472,8 @@ "", "euler345();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16349,8 +16511,8 @@ "", "euler346();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16397,8 +16559,8 @@ "", "euler347();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16424,7 +16586,7 @@ "22232 + 663", "18102 + 1253", "11972 + 1563", - " ", + "", "Find the sum of the five smallest such palindromic numbers." ], "files": { @@ -16440,8 +16602,8 @@ "", "euler348();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16479,8 +16641,8 @@ "", "euler349();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16526,8 +16688,8 @@ "", "euler350();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16579,8 +16741,8 @@ "", "euler351();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16650,8 +16812,8 @@ "", "euler352();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16712,8 +16874,8 @@ "", "euler353();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16757,8 +16919,8 @@ "", "euler354();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16798,8 +16960,8 @@ "", "euler355();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16839,8 +17001,8 @@ "", "euler356();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16878,8 +17040,8 @@ "", "euler357();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -16940,8 +17102,8 @@ "", "euler358();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17003,8 +17165,8 @@ "", "euler359();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17048,8 +17210,8 @@ "", "euler360();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17107,8 +17269,8 @@ "", "euler361();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17157,8 +17319,8 @@ "", "euler362();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17212,8 +17374,8 @@ "", "euler363();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17258,8 +17420,8 @@ "", "euler364();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17298,8 +17460,8 @@ "", "euler365();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17355,8 +17517,8 @@ "", "euler366();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17405,8 +17567,8 @@ "", "euler367();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17452,8 +17614,8 @@ "", "euler368();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17490,8 +17652,8 @@ "", "euler369();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17530,8 +17692,8 @@ "", "euler370();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17576,8 +17738,8 @@ "", "euler371();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17616,8 +17778,8 @@ "", "euler372();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17659,8 +17821,8 @@ "", "euler373();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17712,8 +17874,8 @@ "", "euler374();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17738,7 +17900,7 @@ " Sn+1", " = ", " Sn2 mod 50515093", - " ", + "", "", "", "Let A(i, j) be the minimum of the numbers Si, Si+1, ... , Sj for i ≤ j.", @@ -17761,8 +17923,8 @@ "", "euler375();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17831,8 +17993,8 @@ "", "euler376();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17874,8 +18036,8 @@ "", "euler377();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17926,8 +18088,8 @@ "", "euler378();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -17970,8 +18132,8 @@ "", "euler379();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18017,8 +18179,8 @@ "", "euler380();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18062,8 +18224,8 @@ "", "euler381();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18119,8 +18281,8 @@ "", "euler382();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18163,8 +18325,8 @@ "", "euler383();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18221,8 +18383,8 @@ "", "euler384();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18275,8 +18437,8 @@ "", "euler385();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18319,8 +18481,8 @@ "", "euler386();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18369,8 +18531,8 @@ "", "euler387();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18412,8 +18574,8 @@ "", "euler388();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18447,8 +18609,8 @@ "", "euler389();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18490,8 +18652,8 @@ "", "euler390();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18551,8 +18713,8 @@ "", "euler391();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18601,8 +18763,8 @@ "", "euler392();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18641,8 +18803,8 @@ "", "euler393();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18691,8 +18853,8 @@ "", "euler394();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18743,8 +18905,8 @@ "", "euler395();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18801,8 +18963,8 @@ "", "euler396();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18842,8 +19004,8 @@ "", "euler397();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18885,8 +19047,8 @@ "", "euler398();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18940,8 +19102,8 @@ "", "euler399();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -18995,8 +19157,8 @@ "", "euler400();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19040,8 +19202,8 @@ "", "euler401();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19091,8 +19253,8 @@ "", "euler402();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19136,8 +19298,8 @@ "", "euler403();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19189,8 +19351,8 @@ "", "euler404();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19244,8 +19406,8 @@ "", "euler405();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19301,8 +19463,8 @@ "", "euler406();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19343,8 +19505,8 @@ "", "euler407();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19386,8 +19548,8 @@ "", "euler408();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19426,8 +19588,8 @@ "", "euler409();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19467,8 +19629,8 @@ "", "euler410();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19513,8 +19675,8 @@ "", "euler411();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19561,8 +19723,8 @@ "", "euler412();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19604,8 +19766,8 @@ "", "euler413();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19669,8 +19831,8 @@ "", "euler414();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19712,8 +19874,8 @@ "", "euler415();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19751,8 +19913,8 @@ "", "euler416();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19807,8 +19969,8 @@ "", "euler417();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19850,8 +20012,8 @@ "", "euler418();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19901,8 +20063,8 @@ "", "euler419();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19947,8 +20109,8 @@ "", "euler420();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -19989,8 +20151,8 @@ "", "euler421();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20035,8 +20197,8 @@ "", "euler422();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20086,8 +20248,8 @@ "", "euler423();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20140,8 +20302,8 @@ "", "euler424();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20191,8 +20353,8 @@ "", "euler425();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20254,8 +20416,8 @@ "", "euler426();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20298,8 +20460,8 @@ "", "euler427();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20307,17 +20469,30 @@ "id": "5900f5191000cf542c51002b", "challengeType": 5, "type": "bonfire", - "title": "Problem 428: About Project Euler", + "title": "Problem 428: Necklace of Circles", "tests": [ { - "text": "euler428() should return 747215561862.", - "testString": "assert.strictEqual(euler428(), 747215561862, 'euler428() should return 747215561862.');" + "text": "necklace(1000000000) should return 747215561862.", + "testString": "assert.strictEqual(necklace(1000000000), 747215561862, 'necklace(1000000000) should return 747215561862.');" } ], "solutions": [], "translations": {}, "description": [ - "" + "Let a, b and c be positive numbers.", + "Let W, X, Y, Z be four collinear points where |WX| = a, |XY| = b, |YZ| = c and |WZ| = a + b + c.", + "Let Cin be the circle having the diameter XY.", + "Let Cout be the circle having the diameter WZ.", + "", + "The triplet (a, b, c) is called a necklace triplet if you can place k ≥ 3 distinct circles C1, C2, ..., Ck such that:", + "
      • Ci has no common interior points with any Cj for 1 ≤ i, jk and ij,
      • Ci is tangent to both Cin and Cout for 1 ≤ ik,
      • Ci is tangent to Ci+1 for 1 ≤ i < k, and
      • Ck is tangent to C1.
      ", + "For example, (5, 5, 5) and (4, 3, 21) are necklace triplets, while it can be shown that (2, 2, 5) is not.", + "\"a", + "", + "Let T(n) be the number of necklace triplets (a, b, c) such that a, b and c are positive integers, and bn.", + "For example, T(1) = 9, T(20) = 732 and T(3000) = 438106.", + "", + "Find T(1 000 000 000)." ], "files": { "indexjs": { @@ -20325,15 +20500,15 @@ "ext": "js", "name": "index", "contents": [ - "function euler428() {", + "function necklace(n) {", " // Good luck!", " return true;", "}", "", - "euler428();" + "necklace(1000000000)" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20374,8 +20549,8 @@ "", "euler429();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20422,8 +20597,8 @@ "", "euler430();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20446,7 +20621,7 @@ "Quick thinking Quentin explains that when granular materials are delivered from above a conical slope is formed and the natural angle made with the horizontal is called the angle of repose. For example if the angle of repose, $\\alpha = 30$ degrees, and grain is delivered at the centre of the silo then a perfect cone will form towards the top of the cylinder. In the case of this silo, which has a diameter of 6m, the amount of space wasted would be approximately 32.648388556 m3. However, if grain is delivered at a point on the top which has a horizontal distance of $x$ metres from the centre then a cone with a strangely curved and sloping base is formed. He shows Fred a picture.", "", "", - " ", + "", "", "We shall let the amount of space wasted in cubic metres be given by $V(x)$. If $x = 1.114785284$, which happens to have three squared decimal places, then the amount of space wasted, $V(1.114785284) \\approx 36$. Given the range of possible solutions to this problem there is exactly one other option: $V(2.511167869) \\approx 49$. It would be like knowing that the square is king of the silo, sitting in splendid glory on top of your grain.", "", @@ -20467,8 +20642,8 @@ "", "euler431();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20506,8 +20681,8 @@ "", "euler432();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20551,8 +20726,8 @@ "", "euler433();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20600,8 +20775,8 @@ "", "euler434();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20637,8 +20812,8 @@ "", "euler435();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20685,8 +20860,8 @@ "", "euler436();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20737,8 +20912,8 @@ "", "euler437();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20783,8 +20958,8 @@ "", "euler438();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20822,8 +20997,8 @@ "", "euler439();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20870,8 +21045,8 @@ "", "euler440();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20914,8 +21089,8 @@ "", "euler441();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20954,8 +21129,8 @@ "", "euler442();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -20981,7 +21156,7 @@ "", " n4567891011121314151617181920...", " g(n)1314161718272829303132333451545560...", - " ", + "", "", "You are given that g(1 000) = 2524 and g(1 000 000) = 2624152.", "", @@ -21000,8 +21175,8 @@ "", "euler443();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21050,8 +21225,8 @@ "", "euler444();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21078,7 +21253,7 @@ "You are given that", "∑ R(c) for c=C(100 000,k), and 1 ≤ k ≤99 999 ≡628701600 (mod 1 000 000 007).", "(C(n,k) is the binomial coefficient).", - " ", + "", "Find ∑ R(c) for c=C(10 000 000,k), and 1 ≤k≤ 9 999 999.", "Give your answer modulo 1 000 000 007." ], @@ -21095,8 +21270,8 @@ "", "euler445();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21138,8 +21313,8 @@ "", "euler446();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21166,7 +21341,7 @@ "F(N)=∑R(n) for 2≤n≤N.", "F(107)≡638042271 (mod 1 000 000 007).", "", - " ", + "", "Find F(1014) (mod 1 000 000 007)." ], "files": { @@ -21182,8 +21357,8 @@ "", "euler447();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21224,8 +21399,8 @@ "", "euler448();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21248,7 +21423,7 @@ "", "Phil wants to know how much chocolate is needed to cover one candy centre with a uniform coat of chocolate one millimeter thick.", "If a=1 mm and b=1 mm, the amount of chocolate required is ", - " ", + "", " 283", " π mm3", "", @@ -21270,8 +21445,8 @@ "", "euler449();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21332,8 +21507,8 @@ "", "euler450();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21381,8 +21556,8 @@ "", "euler451();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21418,8 +21593,8 @@ "", "euler452();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21460,8 +21635,8 @@ "", "euler453();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21505,8 +21680,8 @@ "", "euler454();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21547,8 +21722,8 @@ "", "euler455();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21596,8 +21771,8 @@ "", "euler456();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21638,8 +21813,8 @@ "", "euler457();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21678,8 +21853,8 @@ "", "euler458();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21732,8 +21907,8 @@ "", "euler459();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21786,8 +21961,8 @@ "", "euler460();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21826,8 +22001,8 @@ "", "euler461();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21874,8 +22049,8 @@ "", "euler462();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21917,8 +22092,8 @@ "", "euler463();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -21970,8 +22145,8 @@ "", "euler464();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22020,8 +22195,8 @@ "", "euler465();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22069,8 +22244,8 @@ "", "euler466();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22121,8 +22296,8 @@ "", "euler467();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22169,8 +22344,8 @@ "", "euler468();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22213,8 +22388,8 @@ "", "euler469();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22259,8 +22434,8 @@ "", "euler470();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22302,8 +22477,8 @@ "", "euler471();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22353,8 +22528,8 @@ "", "euler472();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22404,8 +22579,8 @@ "", "euler473();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22445,8 +22620,8 @@ "", "euler474();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22486,8 +22661,8 @@ "", "euler475();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22523,8 +22698,8 @@ "", "euler476();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22571,8 +22746,8 @@ "", "euler477();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22625,8 +22800,8 @@ "", "euler478();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22667,8 +22842,8 @@ "", "euler479();" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -22739,5483 +22914,10 @@ "", "euler480();" ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f54d1000cf542c510060", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 481: Chef Showdown", - "tests": [ - { - "text": "euler481() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler481(), TODO: MISSING ANSWER, 'euler481() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A group of chefs (numbered #1, #2, etc) participate in a turn-based strategic cooking competition. On each chef's turn, he/she cooks up a dish to the best of his/her ability and gives it to a separate panel of judges for taste-testing. Let S(k) represent chef #k's skill level (which is publicly known). More specifically, S(k) is the probability that chef #k's dish will be assessed favorably by the judges (on any/all turns). If the dish receives a favorable rating, then the chef must choose one other chef to be eliminated from the competition. The last chef remaining in the competition is the winner.", - "", - "The game always begins with chef #1, with the turn order iterating sequentially over the rest of the chefs still in play. Then the cycle repeats from the lowest-numbered chef. All chefs aim to optimize their chances of winning within the rules as stated, assuming that the other chefs behave in the same manner. In the event that a chef has more than one equally-optimal elimination choice, assume that the chosen chef is always the one with the next-closest turn.", - "", - "Define Wn(k) as the probability that chef #k wins in a competition with n chefs. If we have S(1) = 0.25, S(2) = 0.5, and S(3) = 1, then W3(1) = 0.29375.", - "", - "Going forward, we assign S(k) = Fk/Fn+1 over all 1 ≤ k ≤ n, where Fk is a Fibonacci number: Fk = Fk-1 + Fk-2 with base cases F1 = F2 = 1. Then, for example, when considering a competition with n = 7 chefs, we have W7(1) = 0.08965042, W7(2) = 0.20775702, W7(3) = 0.15291406, W7(4) = 0.14554098, W7(5) = 0.15905291, W7(6) = 0.10261412, and W7(7) = 0.14247050, rounded to 8 decimal places each.", - "", - "Let E(n) represent the expected number of dishes cooked in a competition with n chefs. For instance, E(7) = 42.28176050.", - "", - "Find E(14) rounded to 8 decimal places." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler481() {", - " // Good luck!", - " return true;", - "}", - "", - "euler481();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f54f1000cf542c510061", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 482: The incenter of a triangle", - "tests": [ - { - "text": "euler482() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler482(), TODO: MISSING ANSWER, 'euler482() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "ABC is an integer sided triangle with incenter I and perimeter p.", - "The segments IA, IB and IC have integral length as well. ", - "", - "", - "Let L = p + |IA| + |IB| + |IC|. ", - "", - "", - "Let S(P) = ∑L for all such triangles where p ≤ P. For example, S(103) = 3619.", - "", - "", - "Find S(107)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler482() {", - " // Good luck!", - " return true;", - "}", - "", - "euler482();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f54f1000cf542c510062", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 483: Repeated permutation", - "tests": [ - { - "text": "euler483() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler483(), TODO: MISSING ANSWER, 'euler483() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "We define a permutation as an operation that rearranges the order of the elements {1, 2, 3, ..., n}.", - "There are n! such permutations, one of which leaves the elements in their initial order.", - "For n = 3 we have 3! = 6 permutations:", - "- P1 = keep the initial order", - "- P2 = exchange the 1st and 2nd elements", - "- P3 = exchange the 1st and 3rd elements", - "- P4 = exchange the 2nd and 3rd elements", - "- P5 = rotate the elements to the right", - "- P6 = rotate the elements to the left", - "", - "", - "If we select one of these permutations, and we re-apply the same permutation repeatedly, we eventually restore the initial order.For a permutation Pi, let f(Pi) be the number of steps required to restore the initial order by applying the permutation Pi repeatedly.For n = 3, we obtain:- f(P1) = 1 : (1,2,3) → (1,2,3)- f(P2) = 2 : (1,2,3) → (2,1,3) → (1,2,3)- f(P3) = 2 : (1,2,3) → (3,2,1) → (1,2,3)- f(P4) = 2 : (1,2,3) → (1,3,2) → (1,2,3)- f(P5) = 3 : (1,2,3) → (3,1,2) → (2,3,1) → (1,2,3)- f(P6) = 3 : (1,2,3) → (2,3,1) → (3,1,2) → (1,2,3)", - "", - "", - "Let g(n) be the average value of f2(Pi) over all permutations Pi of length n.g(3) = (12 + 22 + 22 + 22 + 32 + 32)/3! = 31/6 ≈ 5.166666667e0g(5) = 2081/120 ≈ 1.734166667e1g(20) = 12422728886023769167301/2432902008176640000 ≈ 5.106136147e3", - "", - "", - "Find g(350) and write the answer in scientific notation rounded to 10 significant digits, using a lowercase e to separate mantissa and exponent, as in the examples above." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler483() {", - " // Good luck!", - " return true;", - "}", - "", - "euler483();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5501000cf542c510063", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 484: Arithmetic Derivative", - "tests": [ - { - "text": "euler484() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler484(), TODO: MISSING ANSWER, 'euler484() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The arithmetic derivative is defined by", - "p' = 1 for any prime p", - "(ab)' = a'b + ab' for all integers a, b (Leibniz rule)", - "For example, 20' = 24", - "", - "Find ∑ gcd(k,k') for 1 < k ≤ 5·1015", - "", - "Note: gcd(x,y) denotes the greatest common divisor of x and y." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler484() {", - " // Good luck!", - " return true;", - "}", - "", - "euler484();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5511000cf542c510064", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 485: Maximum number of divisors", - "tests": [ - { - "text": "euler485() should return 51281274340.", - "testString": "assert.strictEqual(euler485(), 51281274340, 'euler485() should return 51281274340.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let d(n) be the number of divisors of n.", - "Let M(n,k) be the maximum value of d(j) for n ≤ j ≤ n+k-1.", - "Let S(u,k) be the sum of M(n,k) for 1 ≤ n ≤ u-k+1.", - "", - "", - "You are given that S(1000,10)=17176.", - "", - "", - "Find S(100 000 000,100 000)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler485() {", - " // Good luck!", - " return true;", - "}", - "", - "euler485();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5531000cf542c510065", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 486: Palindrome-containing strings", - "tests": [ - { - "text": "euler486() should return 11408450515.", - "testString": "assert.strictEqual(euler486(), 11408450515, 'euler486() should return 11408450515.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let F5(n) be the number of strings s such that:", - "s consists only of '0's and '1's,", - "s has length at most n, and", - "s contains a palindromic substring of length at least 5.", - "For example, F5(4) = 0, F5(5) = 8, ", - "F5(6) = 42 and F5(11) = 3844.", - "", - "Let D(L) be the number of integers n such that ", - "5 ≤ n ≤ L and F5(n) is divisible by 87654321.", - "", - "For example, D(107) = 0 and D(5·109) = 51.", - "", - "Find D(1018)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler486() {", - " // Good luck!", - " return true;", - "}", - "", - "euler486();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5531000cf542c510066", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 487: Sums of power sums", - "tests": [ - { - "text": "euler487() should return 106650212746.", - "testString": "assert.strictEqual(euler487(), 106650212746, 'euler487() should return 106650212746.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let fk(n) be the sum of the kth powers of the first n positive integers.", - "", - "For example, f2(10) = 12 + 22 + 32 + 42 + 52 + 62 + 72 + 82 + 92 + 102 = 385.", - "", - "Let Sk(n) be the sum of fk(i) for 1 ≤ i ≤ n. For example, S4(100) = 35375333830.", - "", - "What is ∑ (S10000(1012) mod p) over all primes p between 2 ⋅ 109 and 2 ⋅ 109 + 2000?" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler487() {", - " // Good luck!", - " return true;", - "}", - "", - "euler487();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5541000cf542c510067", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 488: Unbalanced Nim", - "tests": [ - { - "text": "euler488() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler488(), TODO: MISSING ANSWER, 'euler488() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Alice and Bob have enjoyed playing Nim every day. However, they finally got bored of playing ordinary three-heap Nim.", - "So, they added an extra rule:", - "", - "- Must not make two heaps of the same size.", - "", - "The triple (a,b,c) indicates the size of three heaps.", - "Under this extra rule, (2,4,5) is one of the losing positions for the next player.", - "", - "To illustrate:", - "- Alice moves to (2,4,3)", - "- Bob moves to (0,4,3)", - "- Alice moves to (0,2,3)", - "- Bob moves to (0,2,1)", - "", - "Unlike ordinary three-heap Nim, (0,1,2) and its permutations are the end states of this game.", - "", - "For an integer N, we define F(N) as the sum of a+b+c for all the losing positions for the next player, with 0 < a < b < c < N.", - "", - "For example, F(8) = 42, because there are 4 losing positions for the next player, (1,3,5), (1,4,6), (2,3,6) and (2,4,5).", - "We can also verify that F(128) = 496062.", - "", - "Find the last 9 digits of F(1018)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler488() {", - " // Good luck!", - " return true;", - "}", - "", - "euler488();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5561000cf542c510068", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 489: Common factors between two sequences", - "tests": [ - { - "text": "euler489() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler489(), TODO: MISSING ANSWER, 'euler489() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let G(a, b) be the smallest non-negative integer n for which gcd(n3 + b, (n + a)3 + b) is maximized.", - "For example, G(1, 1) = 5 because gcd(n3 + 1, (n + 1)3 + 1) reaches its maximum value of 7 for n = 5, and is smaller for 0 ≤ n < 5.", - "Let H(m, n) = Σ G(a, b) for 1 ≤ a ≤ m, 1 ≤ b ≤ n.", - "You are given H(5, 5) = 128878 and H(10, 10) = 32936544.", - "Find H(18, 1900)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler489() {", - " // Good luck!", - " return true;", - "}", - "", - "euler489();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5561000cf542c510069", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 490: Jumping frog", - "tests": [ - { - "text": "euler490() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler490(), TODO: MISSING ANSWER, 'euler490() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "There are n stones in a pond, numbered 1 to n. Consecutive stones are spaced one unit apart.", - "", - "A frog sits on stone 1. He wishes to visit each stone exactly once, stopping on stone n. However, he can only jump from one stone to another if they are at most 3 units apart. In other words, from stone i, he can reach a stone j if 1 ≤ j ≤ n and j is in the set {i-3, i-2, i-1, i+1, i+2, i+3}.", - "", - "Let f(n) be the number of ways he can do this. For example, f(6) = 14, as shown below:", - "1 → 2 → 3 → 4 → 5 → 6 ", - "1 → 2 → 3 → 5 → 4 → 6 ", - "1 → 2 → 4 → 3 → 5 → 6 ", - "1 → 2 → 4 → 5 → 3 → 6 ", - "1 → 2 → 5 → 3 → 4 → 6 ", - "1 → 2 → 5 → 4 → 3 → 6 ", - "1 → 3 → 2 → 4 → 5 → 6 ", - "1 → 3 → 2 → 5 → 4 → 6 ", - "1 → 3 → 4 → 2 → 5 → 6 ", - "1 → 3 → 5 → 2 → 4 → 6 ", - "1 → 4 → 2 → 3 → 5 → 6 ", - "1 → 4 → 2 → 5 → 3 → 6 ", - "1 → 4 → 3 → 2 → 5 → 6 ", - "1 → 4 → 5 → 2 → 3 → 6", - "", - "Other examples are f(10) = 254 and f(40) = 1439682432976.", - "", - "Let S(L) = ∑ f(n)3 for 1 ≤ n ≤ L.", - "Examples:", - "S(10) = 18230635", - "S(20) = 104207881192114219", - "S(1 000) mod 109 = 225031475", - "S(1 000 000) mod 109 = 363486179", - "", - "Find S(1014) mod 109." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler490() {", - " // Good luck!", - " return true;", - "}", - "", - "euler490();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5591000cf542c51006b", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 491: Double pandigital number divisible by 11", - "tests": [ - { - "text": "euler491() should return 194505988824000.", - "testString": "assert.strictEqual(euler491(), 194505988824000, 'euler491() should return 194505988824000.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "We call a positive integer double pandigital if it uses all the digits 0 to 9 exactly twice (with no leading zero). For example, 40561817703823564929 is one such number.", - "", - "How many double pandigital numbers are divisible by 11?" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler491() {", - " // Good luck!", - " return true;", - "}", - "", - "euler491();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5581000cf542c51006a", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 492: Exploding sequence", - "tests": [ - { - "text": "euler492() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler492(), TODO: MISSING ANSWER, 'euler492() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Define the sequence a1, a2, a3, ... as:", - "a1 = 1", - "an+1 = 6an2 + 10an + 3 for n ≥ 1.", - "", - "Examples:", - "a3 = 2359", - "a6 = 269221280981320216750489044576319", - "a6 mod 1 000 000 007 = 203064689", - "a100 mod 1 000 000 007 = 456482974", - "", - "", - "", - "Define B(x,y,n) as ∑ (an mod p) for every prime p such that x ≤ p ≤ x+y.", - "", - "", - "", - "Examples:", - "B(109, 103, 103) = 23674718882", - "B(109, 103, 1015) = 20731563854", - "", - "", - "Find B(109, 107, 1015)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler492() {", - " // Good luck!", - " return true;", - "}", - "", - "euler492();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f55a1000cf542c51006c", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 493: Under The Rainbow", - "tests": [ - { - "text": "euler493() should return 6.818741802.", - "testString": "assert.strictEqual(euler493(), 6.818741802, 'euler493() should return 6.818741802.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "70 colored balls are placed in an urn, 10 for each of the seven rainbow colors.", - "What is the expected number of distinct colors in 20 randomly picked balls?", - "Give your answer with nine digits after the decimal point (a.bcdefghij)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler493() {", - " // Good luck!", - " return true;", - "}", - "", - "euler493();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f55a1000cf542c51006d", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 494: Collatz prefix families", - "tests": [ - { - "text": "euler494() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler494(), TODO: MISSING ANSWER, 'euler494() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The Collatz sequence is defined as:", - "$a_{i+1} = \\left\\{ \\large{\\frac {a_i} 2 \\atop 3 a_i+1} {\\text{if }a_i\\text{ is even} \\atop \\text{if }a_i\\text{ is odd}} \\right.$.", - "", - "", - "The Collatz conjecture states that starting from any positive integer, the sequence eventually reaches the cycle 1,4,2,1....", - "We shall define the sequence prefix p(n) for the Collatz sequence starting with a1 = n as the sub-sequence of all numbers not a power of 2 (20=1 is considered a power of 2 for this problem). For example:p(13) = {13, 40, 20, 10, 5} p(8) = {}", - "Any number invalidating the conjecture would have an infinite length sequence prefix.", - "", - "", - "Let Sm be the set of all sequence prefixes of length m. Two sequences {a1, a2, ..., am} and {b1, b2, ..., bm} in Sm are said to belong to the same prefix family if ai < aj if and only if bi < bj for all 1 ≤ i,j ≤ m.", - "", - "", - "For example, in S4, {6, 3, 10, 5} is in the same family as {454, 227, 682, 341}, but not {113, 340, 170, 85}.", - "Let f(m) be the number of distinct prefix families in Sm.", - "You are given f(5) = 5, f(10) = 55, f(20) = 6771.", - "", - "", - "Find f(90)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler494() {", - " // Good luck!", - " return true;", - "}", - "", - "euler494();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f55b1000cf542c51006e", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 495: Writing n as the product of k distinct positive integers", - "tests": [ - { - "text": "euler495() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler495(), TODO: MISSING ANSWER, 'euler495() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let W(n,k) be the number of ways in which n can be written as the product of k distinct positive integers.", - "For example, W(144,4) = 7. There are 7 ways in which 144 can be written as a product of 4 distinct positive integers:", - "144 = 1×2×4×18", - "144 = 1×2×8×9", - "144 = 1×2×3×24", - "144 = 1×2×6×12", - "144 = 1×3×4×12", - "144 = 1×3×6×8", - "144 = 2×3×4×6", - "Note that permutations of the integers themselves are not considered distinct.", - "Furthermore, W(100!,10) modulo 1 000 000 007 = 287549200.", - "Find W(10000!,30) modulo 1 000 000 007." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler495() {", - " // Good luck!", - " return true;", - "}", - "", - "euler495();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f55d1000cf542c51006f", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 496: Incenter and circumcenter of triangle", - "tests": [ - { - "text": "euler496() should return 2042473533769142800.", - "testString": "assert.strictEqual(euler496(), 2042473533769142800, 'euler496() should return 2042473533769142800.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Given an integer sided triangle ABC:", - "Let I be the incenter of ABC.", - "Let D be the intersection between the line AI and the circumcircle of ABC (A ≠ D).", - "", - "We define F(L) as the sum of BC for the triangles ABC that satisfy AC = DI and BC ≤ L.", - "", - "For example, F(15) = 45 because the triangles ABC with (BC,AC,AB) = (6,4,5), (12,8,10), (12,9,7), (15,9,16) satisfy the conditions.", - "", - "Find F(109)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler496() {", - " // Good luck!", - " return true;", - "}", - "", - "euler496();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f55f1000cf542c510070", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 497: Drunken Tower of Hanoi", - "tests": [ - { - "text": "euler497() should return 684901360.", - "testString": "assert.strictEqual(euler497(), 684901360, 'euler497() should return 684901360.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Bob is very familiar with the famous mathematical puzzle/game, \"Tower of Hanoi,\" which consists of three upright rods and disks of different sizes that can slide onto any of the rods. The game begins with a stack of n disks placed on the leftmost rod in descending order by size. The objective of the game is to move all of the disks from the leftmost rod to the rightmost rod, given the following restrictions:", - "", - "Only one disk can be moved at a time.", - "A valid move consists of taking the top disk from one stack and placing it onto another stack (or an empty rod).", - "No disk can be placed on top of a smaller disk.", - "Moving on to a variant of this game, consider a long room k units (square tiles) wide, labeled from 1 to k in ascending order. Three rods are placed at squares a, b, and c, and a stack of n disks is placed on the rod at square a.", - "", - "Bob begins the game standing at square b. His objective is to play the Tower of Hanoi game by moving all of the disks to the rod at square c. However, Bob can only pick up or set down a disk if he is on the same square as the rod / stack in question.", - "", - "Unfortunately, Bob is also drunk. On a given move, Bob will either stumble one square to the left or one square to the right with equal probability, unless Bob is at either end of the room, in which case he can only move in one direction. Despite Bob's inebriated state, he is still capable of following the rules of the game itself, as well as choosing when to pick up or put down a disk.", - "", - "The following animation depicts a side-view of a sample game for n = 3, k = 7, a = 2, b = 4, and c = 6:", - "", - "", - "", - "Let E(n,k,a,b,c) be the expected number of squares that Bob travels during a single optimally-played game. A game is played optimally if the number of disk-pickups is minimized.", - "", - "Interestingly enough, the result is always an integer. For example, E(2,5,1,3,5) = 60 and E(3,20,4,9,17) = 2358.", - "", - "Find the last nine digits of ∑1≤n≤10000 E(n,10n,3n,6n,9n)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler497() {", - " // Good luck!", - " return true;", - "}", - "", - "euler497();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f55f1000cf542c510071", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 498: Remainder of polynomial division", - "tests": [ - { - "text": "euler498() should return 472294837.", - "testString": "assert.strictEqual(euler498(), 472294837, 'euler498() should return 472294837.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "For positive integers n and m, we define two polynomials Fn(x) = xn and Gm(x) = (x-1)m.", - "We also define a polynomial Rn,m(x) as the remainder of the division of Fn(x) by Gm(x).", - "For example, R6,3(x) = 15x2 - 24x + 10.", - "", - "Let C(n, m, d) be the absolute value of the coefficient of the d-th degree term of Rn,m(x).", - "We can verify that C(6, 3, 1) = 24 and C(100, 10, 4) = 227197811615775.", - "", - "Find C(1013, 1012, 104) mod 999999937." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler498() {", - " // Good luck!", - " return true;", - "}", - "", - "euler498();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5611000cf542c510072", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 499: St. Petersburg Lottery", - "tests": [ - { - "text": "euler499() should return 0.8660312.", - "testString": "assert.strictEqual(euler499(), 0.8660312, 'euler499() should return 0.8660312.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A gambler decides to participate in a special lottery. In this lottery the gambler plays a series of one or more games.", - "Each game costs m pounds to play and starts with an initial pot of 1 pound. The gambler flips an unbiased coin. Every time a head appears, the pot is doubled and the gambler continues. When a tail appears, the game ends and the gambler collects the current value of the pot. The gambler is certain to win at least 1 pound, the starting value of the pot, at the cost of m pounds, the initial fee.", - "", - "The gambler cannot continue to play if his fortune falls below m pounds.", - "Let pm(s) denote the probability that the gambler will never run out of money in this lottery given his initial fortune s and the cost per game m.", - "For example p2(2) ≈ 0.2522, p2(5) ≈ 0.6873 and p6(10 000) ≈ 0.9952 (note: pm(s) = 0 for s < m).", - "", - "Find p15(109) and give your answer rounded to 7 decimal places behind the decimal point in the form 0.abcdefg." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler499() {", - " // Good luck!", - " return true;", - "}", - "", - "euler499();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5611000cf542c510073", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 500: Problem 500!!!", - "tests": [ - { - "text": "euler500() should return 35407281.", - "testString": "assert.strictEqual(euler500(), 35407281, 'euler500() should return 35407281.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The number of divisors of 120 is 16.", - "In fact 120 is the smallest number having 16 divisors.", - "", - "", - "Find the smallest number with 2500500 divisors.", - "Give your answer modulo 500500507." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler500() {", - " // Good luck!", - " return true;", - "}", - "", - "euler500();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5621000cf542c510074", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 501: Eight Divisors", - "tests": [ - { - "text": "euler501() should return 197912312715.", - "testString": "assert.strictEqual(euler501(), 197912312715, 'euler501() should return 197912312715.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The eight divisors of 24 are 1, 2, 3, 4, 6, 8, 12 and 24.", - "The ten numbers not exceeding 100 having exactly eight divisors are 24, 30, 40, 42, 54, 56, 66, 70, 78 and 88.", - "Let f(n) be the count of numbers not exceeding n with exactly eight divisors.", - "You are given f(100) = 10, f(1000) = 180 and f(106) = 224427.", - "Find f(1012)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler501() {", - " // Good luck!", - " return true;", - "}", - "", - "euler501();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5621000cf542c510075", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 502: Counting Castles", - "tests": [ - { - "text": "euler502() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler502(), TODO: MISSING ANSWER, 'euler502() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "We define a block to be a rectangle with a height of 1 and an integer-valued length. Let a castle be a configuration of stacked blocks.", - "", - "Given a game grid that is w units wide and h units tall, a castle is generated according to the following rules:", - "", - "", - "Blocks can be placed on top of other blocks as long as nothing sticks out past the edges or hangs out over open space.", - "All blocks are aligned/snapped to the grid.", - "Any two neighboring blocks on the same row have at least one unit of space between them.", - "The bottom row is occupied by a block of length w.", - "The maximum achieved height of the entire castle is exactly h.", - "The castle is made from an even number of blocks.", - "The following is a sample castle for w=8 and h=5:", - "", - "", - "", - "Let F(w,h) represent the number of valid castles, given grid parameters w and h.", - "", - "For example, F(4,2) = 10, F(13,10) = 3729050610636, F(10,13) = 37959702514, and F(100,100) mod 1 000 000 007 = 841913936.", - "", - "Find (F(1012,100) + F(10000,10000) + F(100,1012)) mod 1 000 000 007." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler502() {", - " // Good luck!", - " return true;", - "}", - "", - "euler502();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5631000cf542c510076", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 503: Compromise or persist", - "tests": [ - { - "text": "euler503() should return 3.8694550145.", - "testString": "assert.strictEqual(euler503(), 3.8694550145, 'euler503() should return 3.8694550145.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Alice is playing a game with n cards numbered 1 to n.", - "", - "A game consists of iterations of the following steps.", - "(1) Alice picks one of the cards at random.", - "(2) Alice cannot see the number on it. Instead, Bob, one of her friends, sees the number and tells Alice how many previously-seen numbers are bigger than the number which he is seeing.", - "(3) Alice can end or continue the game. If she decides to end, the number becomes her score. If she decides to continue, the card is removed from the game and she returns to (1). If there is no card left, she is forced to end the game.", - "", - "Let F(n) be the Alice's expected score if she takes the optimized strategy to minimize her score.", - "", - "For example, F(3) = 5/3. At the first iteration, she should continue the game. At the second iteration, she should end the game if Bob says that one previously-seen number is bigger than the number which he is seeing, otherwise she should continue the game.", - "", - "We can also verify that F(4) = 15/8 and F(10) ≈ 2.5579365079.", - "", - "Find F(106). Give your answer rounded to 10 decimal places behind the decimal point." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler503() {", - " // Good luck!", - " return true;", - "}", - "", - "euler503();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5641000cf542c510077", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 504: Square on the Inside", - "tests": [ - { - "text": "euler504() should return 694687.", - "testString": "assert.strictEqual(euler504(), 694687, 'euler504() should return 694687.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let ABCD be a quadrilateral whose vertices are lattice points lying on the coordinate axes as follows:", - "", - "A(a, 0), B(0, b), C(−c, 0), D(0, −d), where 1 ≤ a, b, c, d ≤ m and a, b, c, d, m are integers.", - "", - "It can be shown that for m = 4 there are exactly 256 valid ways to construct ABCD. Of these 256 quadrilaterals, 42 of them strictly contain a square number of lattice points.", - "", - "How many quadrilaterals ABCD strictly contain a square number of lattice points for m = 100?" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler504() {", - " // Good luck!", - " return true;", - "}", - "", - "euler504();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5661000cf542c510078", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 505: Bidirectional Recurrence", - "tests": [ - { - "text": "euler505() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler505(), TODO: MISSING ANSWER, 'euler505() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let:", - "$\\begin{array}{ll} x(0)&=0 \\\\ x(1)&=1 \\\\ x(2k)&=(3x(k)+2x(\\lfloor \\frac k 2 \\rfloor)) \\text{ mod } 2^{60} \\text{ for } k \\ge 1 \\text {, where } \\lfloor \\text { } \\rfloor \\text { is the floor function} \\\\ x(2k+1)&=(2x(k)+3x(\\lfloor \\frac k 2 \\rfloor)) \\text{ mod } 2^{60} \\text{ for } k \\ge 1 \\\\ y_n(k)&=\\left\\{{\\begin{array}{lc} x(k) && \\text{if } k \\ge n \\\\ 2^{60} - 1 - max(y_n(2k),y_n(2k+1)) && \\text{if } k < n \\end{array}} \\right. \\\\ A(n)&=y_n(1) \\end{array}$", - "You are given:", - "$\\begin{array}{ll} x(2)&=3 \\\\ x(3)&=2 \\\\ x(4)&=11 \\\\ y_4(4)&=11 \\\\ y_4(3)&=2^{60}-9\\\\ y_4(2)&=2^{60}-12 \\\\ y_4(1)&=A(4)=8 \\\\ A(10)&=2^{60}-34\\\\ A(10^3)&=101881 \\end{array}$", - "Find $A(10^{12})$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler505() {", - " // Good luck!", - " return true;", - "}", - "", - "euler505();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5671000cf542c510079", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 506: Clock sequence", - "tests": [ - { - "text": "euler506() should return 18934502.", - "testString": "assert.strictEqual(euler506(), 18934502, 'euler506() should return 18934502.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Consider the infinite repeating sequence of digits:", - "1234321234321234321...", - "Amazingly, you can break this sequence of digits into a sequence of integers such that the sum of the digits in the n'th value is n.", - "The sequence goes as follows:", - "1, 2, 3, 4, 32, 123, 43, 2123, 432, 1234, 32123, ...", - "Let vn be the n'th value in this sequence. For example, v2 = 2, v5 = 32 and v11 = 32123.", - "Let S(n) be v1 + v2 + ... + vn. For example, S(11) = 36120, and S(1000) mod 123454321 = 18232686.", - "Find S(1014) mod 123454321." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler506() {", - " // Good luck!", - " return true;", - "}", - "", - "euler506();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5671000cf542c51007a", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 507: Shortest Lattice Vector", - "tests": [ - { - "text": "euler507() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler507(), TODO: MISSING ANSWER, 'euler507() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let $t_n$ be the tribonacci numbers defined as:", - "$t_0 = t_1 = 0$;", - "$t_2 = 1$;", - "$t_n = t_{n-1} + t_{n-2} + t_{n-3}$ for $n \\ge 3$", - "and let $r_n = t_n \\text{ mod } 10^7$.", - "", - "", - "For each pair of Vectors $V_n=(v_1,v_2,v_3)$ and $W_n=(w_1,w_2,w_3)$ with $v_1=r_{12n-11}-r_{12n-10}, v_2=r_{12n-9}+r_{12n-8}, v_3=r_{12n-7} \\cdot r_{12n-6}$ and $w_1=r_{12n-5}-r_{12n-4}, w_2=r_{12n-3}+r_{12n-2}, w_3=r_{12n-1} \\cdot r_{12n}$", - "", - "", - "we define $S(n)$ as the minimal value of the manhattan length of the vector $D=k \\cdot V_n+l \\cdot W_n$ measured as $|k \\cdot v_1+l \\cdot w_1|+|k \\cdot v_2+l \\cdot w_2|+|k \\cdot v_3+l \\cdot w_3|$", - " for any integers $k$ and $l$ with $(k,l)\\neq (0,0)$.", - "", - "The first vector pair is (-1, 3, 28), (-11, 125, 40826).", - "You are given that $S(1)=32$ and $\\sum_{n=1}^{10} S(n)=130762273722$.", - "", - "", - "Find $\\sum_{n=1}^{20000000} S(n)$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler507() {", - " // Good luck!", - " return true;", - "}", - "", - "euler507();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5691000cf542c51007c", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 508: Integers in base i-1", - "tests": [ - { - "text": "euler508() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler508(), TODO: MISSING ANSWER, 'euler508() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Consider the Gaussian integer i-1. A base i-1 representation of a Gaussian integer a+bi is a finite sequence of digits dn-1dn-2...d1d0 such that:", - "", - "a+bi = dn-1(i-1)n-1 + dn-2(i-1)n-2 + ... + d1(i-1) + d0", - "Each dk is in {0,1}", - "There are no leading zeroes, i.e. dn-1 ≠ 0, unless a+bi is itself 0", - "Here are base i-1 representations of a few Gaussian integers:", - "11+24i → 111010110001101", - "24-11i → 110010110011", - "8+0i → 111000000", - "-5+0i → 11001101", - "0+0i → 0", - "", - "Remarkably, every Gaussian integer has a unique base i-1 representation!", - "", - "Define f(a+bi) as the number of 1s in the unique base i-1 representation of a+bi. For example, f(11+24i) = 9 and f(24-11i) = 7.", - "", - "Define B(L) as the sum of f(a+bi) for all integers a, b such that |a| ≤ L and |b| ≤ L. For example, B(500) = 10795060.", - "", - "Find B(1015) mod 1 000 000 007." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler508() {", - " // Good luck!", - " return true;", - "}", - "", - "euler508();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5691000cf542c51007b", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 509: Divisor Nim", - "tests": [ - { - "text": "euler509() should return 151725678.", - "testString": "assert.strictEqual(euler509(), 151725678, 'euler509() should return 151725678.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Anton and Bertrand love to play three pile Nim.", - "However, after a lot of games of Nim they got bored and changed the rules somewhat.", - "They may only take a number of stones from a pile that is a proper divisor of the number of stones present in the pile. E.g. if a pile at a certain moment contains 24 stones they may take only 1,2,3,4,6,8 or 12 stones from that pile.", - "So if a pile contains one stone they can't take the last stone from it as 1 isn't a proper divisor of 1.", - "The first player that can't make a valid move loses the game.", - "Of course both Anton and Bertrand play optimally.", - "", - "The triple (a,b,c) indicates the number of stones in the three piles.", - "Let S(n) be the number of winning positions for the next player for 1 ≤ a, b, c ≤ n.S(10) = 692 and S(100) = 735494.", - "", - "Find S(123456787654321) modulo 1234567890." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler509() {", - " // Good luck!", - " return true;", - "}", - "", - "euler509();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f56b1000cf542c51007d", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 510: Tangent Circles", - "tests": [ - { - "text": "euler510() should return 315306518862563700.", - "testString": "assert.strictEqual(euler510(), 315306518862563700, 'euler510() should return 315306518862563700.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Circles A and B are tangent to each other and to line L at three distinct points.", - "Circle C is inside the space between A, B and L, and tangent to all three.", - "Let rA, rB and rC be the radii of A, B and C respectively.", - "Let S(n) = Σ rA + rB + rC, for 0 < rA ≤ rB ≤ n where rA, rB and rC are integers.", - "The only solution for 0 < rA ≤ rB ≤ 5 is rA = 4, rB = 4 and rC = 1, so S(5) = 4 + 4 + 1 = 9.", - "You are also given S(100) = 3072.", - "Find S(109)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler510() {", - " // Good luck!", - " return true;", - "}", - "", - "euler510();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f56b1000cf542c51007e", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 511: Sequences with nice divisibility properties", - "tests": [ - { - "text": "euler511() should return 935247012.", - "testString": "assert.strictEqual(euler511(), 935247012, 'euler511() should return 935247012.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let Seq(n,k) be the number of positive-integer sequences {ai}1≤i≤n of length n such that:", - "n is divisible by ai for 1 ≤ i ≤ n, and", - " n + a1 + a2 + ... + an is divisible by k.", - "Examples:", - "Seq(3,4) = 4, and the 4 sequences are:", - "{1, 1, 3}", - "{1, 3, 1}", - "{3, 1, 1}", - "{3, 3, 3}", - "Seq(4,11) = 8, and the 8 sequences are:", - "{1, 1, 1, 4}", - "{1, 1, 4, 1}", - "{1, 4, 1, 1}", - "{4, 1, 1, 1}", - "{2, 2, 2, 1}", - "{2, 2, 1, 2}", - "{2, 1, 2, 2}", - "{1, 2, 2, 2}", - "The last nine digits of Seq(1111,24) are 840643584.", - "Find the last nine digits of Seq(1234567898765,4321)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler511() {", - " // Good luck!", - " return true;", - "}", - "", - "euler511();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f56d1000cf542c51007f", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 512: Sums of totients of powers", - "tests": [ - { - "text": "euler512() should return 50660591862310320.", - "testString": "assert.strictEqual(euler512(), 50660591862310320, 'euler512() should return 50660591862310320.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let $\\varphi(n)$ be Euler's totient function.", - "Let $f(n)=(\\sum_{i=1}^{n}\\varphi(n^i)) \\text{ mod } (n+1)$.", - "Let $g(n)=\\sum_{i=1}^{n} f(i)$.", - "$g(100)=2007$.", - "", - "", - "Find $g(5 \\times 10^8)$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler512() {", - " // Good luck!", - " return true;", - "}", - "", - "euler512();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f56e1000cf542c510080", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 513: Integral median", - "tests": [ - { - "text": "euler513() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler513(), TODO: MISSING ANSWER, 'euler513() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "ABC is an integral sided triangle with sides a≤b≤c.", - "mc is the median connecting C and the midpoint of AB. ", - "F(n) is the number of such triangles with c≤n for which mc has integral length as well.", - "F(10)=3 and F(50)=165.", - "", - "Find F(100000)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler513() {", - " // Good luck!", - " return true;", - "}", - "", - "euler513();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f56f1000cf542c510081", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 514: Geoboard Shapes", - "tests": [ - { - "text": "euler514() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler514(), TODO: MISSING ANSWER, 'euler514() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A geoboard (of order N) is a square board with equally-spaced pins protruding from the surface, representing an integer point lattice for coordinates 0 ≤ x,y ≤ N.", - "", - "John begins with a pinless geoboard. Each position on the board is a hole that can be filled with a pin. John decides to generate a random integer between 1 and N+1 (inclusive) for each hole in the geoboard. If the random integer is equal to 1 for a given hole, then a pin is placed in that hole.", - "", - "After John is finished generating numbers for all (N+1)2 holes and placing any/all corresponding pins, he wraps a tight rubberband around the entire group of pins protruding from the board. Let S represent the shape that is formed. S can also be defined as the smallest convex shape that contains all the pins.", - "", - "", - "", - "The above image depicts a sample layout for N = 4. The green markers indicate positions where pins have been placed, and the blue lines collectively represent the rubberband. For this particular arrangement, S has an area of 6. If there are fewer than three pins on the board (or if all pins are collinear), S can be assumed to have zero area.", - "", - "Let E(N) be the expected area of S given a geoboard of order N. For example, E(1) = 0.18750, E(2) = 0.94335, and E(10) = 55.03013 when rounded to five decimal places each.", - "", - "Calculate E(100) rounded to five decimal places." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler514() {", - " // Good luck!", - " return true;", - "}", - "", - "euler514();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5711000cf542c510083", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 515: Dissonant Numbers", - "tests": [ - { - "text": "euler515() should return 2422639000800.", - "testString": "assert.strictEqual(euler515(), 2422639000800, 'euler515() should return 2422639000800.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let d(p,n,0) be the multiplicative inverse of n modulo prime p, defined as n × d(p,n,0) = 1 mod p.", - "Let d(p,n,k) = $\\sum_{i=1}^n$d(p,i,k−1) for k ≥ 1.", - "Let D(a,b,k) = $\\sum$(d(p,p-1,k) mod p) for all primes a ≤ p < a + b.", - "You are given:", - "D(101,1,10) = 45", - "D(103,102,102) = 8334", - "D(106,103,103) = 38162302Find D(109,105,105)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler515() {", - " // Good luck!", - " return true;", - "}", - "", - "euler515();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5701000cf542c510082", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 516: 5-smooth totients", - "tests": [ - { - "text": "euler516() should return 939087315.", - "testString": "assert.strictEqual(euler516(), 939087315, 'euler516() should return 939087315.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "5-smooth numbers are numbers whose largest prime factor doesn't exceed 5.", - "5-smooth numbers are also called Hamming numbers.", - "Let S(L) be the sum of the numbers n not exceeding L such that Euler's totient function φ(n) is a Hamming number.", - "S(100)=3728.", - "", - "", - "Find S(1012). Give your answer modulo 232." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler516() {", - " // Good luck!", - " return true;", - "}", - "", - "euler516();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5721000cf542c510084", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 517: A real recursion", - "tests": [ - { - "text": "euler517() should return 581468882.", - "testString": "assert.strictEqual(euler517(), 581468882, 'euler517() should return 581468882.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "For every real number $a \\gt 1$ is given the sequence $g_a$ by:", - "$g_{a}(x)=1$ for $x \\lt a$", - "$g_{a}(x)=g_{a}(x-1)+g_a(x-a)$ for $x \\ge a$", - "", - "$G(n)=g_{\\sqrt {n}}(n)$", - "$G(90)=7564511$.", - "", - "Find $\\sum G(p)$ for $p$ prime and $10000000 \\lt p \\lt 10010000$", - "Give your answer modulo 1000000007." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler517() {", - " // Good luck!", - " return true;", - "}", - "", - "euler517();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5721000cf542c510085", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 518: Prime triples and geometric sequences", - "tests": [ - { - "text": "euler518() should return 100315739184392.", - "testString": "assert.strictEqual(euler518(), 100315739184392, 'euler518() should return 100315739184392.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let S(n) = Σ a+b+c over all triples (a,b,c) such that:", - "", - "a, b, and c are prime numbers.", - "a < b < c < n.", - "a+1, b+1, and c+1 form a geometric sequence.", - "For example, S(100) = 1035 with the following triples: ", - "", - "(2, 5, 11), (2, 11, 47), (5, 11, 23), (5, 17, 53), (7, 11, 17), (7, 23, 71), (11, 23, 47), (17, 23, 31), (17, 41, 97), (31, 47, 71), (71, 83, 97)", - "", - "Find S(108)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler518() {", - " // Good luck!", - " return true;", - "}", - "", - "euler518();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5741000cf542c510086", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 519: Tricolored Coin Fountains", - "tests": [ - { - "text": "euler519() should return 804739330.", - "testString": "assert.strictEqual(euler519(), 804739330, 'euler519() should return 804739330.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "An arrangement of coins in one or more rows with the bottom row being a block without gaps and every coin in a higher row touching exactly two coins in the row below is called a fountain of coins. Let f(n) be the number of possible fountains with n coins. For 4 coins there are three possible arrangements:", - "", - "Therefore f(4) = 3 while f(10) = 78.", - "Let T(n) be the number of all possible colorings with three colors for all f(n) different fountains with n coins, given the condition that no two touching coins have the same color. Below you see the possible colorings for one of the three valid fountains for 4 coins:", - "", - "You are given that T(4) = 48 and T(10) = 17760.", - "Find the last 9 digits of T(20000)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler519() {", - " // Good luck!", - " return true;", - "}", - "", - "euler519();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5751000cf542c510087", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 520: Simbers", - "tests": [ - { - "text": "euler520() should return 238413705.", - "testString": "assert.strictEqual(euler520(), 238413705, 'euler520() should return 238413705.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "We define a simber to be a positive integer in which any odd digit, if present, occurs an odd number of times, and any even digit, if present, occurs an even number of times.", - "", - "For example, 141221242 is a 9-digit simber because it has three 1's, four 2's and two 4's. ", - "", - "Let Q(n) be the count of all simbers with at most n digits. ", - "", - "You are given Q(7) = 287975 and Q(100) mod 1 000 000 123 = 123864868.", - "", - "Find (∑1≤u≤39 Q(2u)) mod 1 000 000 123." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler520() {", - " // Good luck!", - " return true;", - "}", - "", - "euler520();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5751000cf542c510088", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 521: Smallest prime factor", - "tests": [ - { - "text": "euler521() should return 44389811.", - "testString": "assert.strictEqual(euler521(), 44389811, 'euler521() should return 44389811.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let smpf(n) be the smallest prime factor of n.", - "smpf(91)=7 because 91=7×13 and smpf(45)=3 because 45=3×3×5.", - "Let S(n) be the sum of smpf(i) for 2 ≤ i ≤ n.", - "E.g. S(100)=1257.", - "", - "", - "", - "Find S(1012) mod 109." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler521() {", - " // Good luck!", - " return true;", - "}", - "", - "euler521();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900f5761000cf542c510089", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 522: Hilbert's Blackout", - "tests": [ - { - "text": "euler522() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler522(), TODO: MISSING ANSWER, 'euler522() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Despite the popularity of Hilbert's infinite hotel, Hilbert decided to try managing extremely large finite hotels, instead. ", - "", - "To cut costs, Hilbert wished to power the new hotel with his own special generator. Each floor would send power to the floor above it, with the top floor sending power back down to the bottom floor. That way, Hilbert could have the generator placed on any given floor (as he likes having the option) and have electricity flow freely throughout the entire hotel.", - "", - "Unfortunately, the contractors misinterpreted the schematics when they built the hotel. They informed Hilbert that each floor sends power to another floor at random, instead. This may compromise Hilbert's freedom to have the generator placed anywhere, since blackouts could occur on certain floors.", - "", - "For example, consider a sample flow diagram for a three-story hotel:", - "", - "", - "", - "If the generator were placed on the first floor, then every floor would receive power. But if it were placed on the second or third floors instead, then there would be a blackout on the first floor. Note that while a given floor can receive power from many other floors at once, it can only send power to one other floor.", - "", - "To resolve the blackout concerns, Hilbert decided to have a minimal number of floors rewired. To rewire a floor is to change the floor it sends power to. In the sample diagram above, all possible blackouts can be avoided by rewiring the second floor to send power to the first floor instead of the third floor.", - "", - "Let F(n) be the sum of the minimum number of floor rewirings needed over all possible power-flow arrangements in a hotel of n floors. For example, F(3) = 6, F(8) = 16276736, and F(100) mod 135707531 = 84326147.", - "", - "Find F(12344321) mod 135707531." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler522() {", - " // Good luck!", - " return true;", - "}", - "", - "euler522();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fe885726495c153991c8", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 523: First Sort I", - "tests": [ - { - "text": "euler523() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler523(), TODO: MISSING ANSWER, 'euler523() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Consider the following algorithm for sorting a list:", - "1. Starting from the beginning of the list, check each pair of adjacent elements in turn.", - "2. If the elements are out of order:", - "a. Move the smallest element of the pair at the beginning of the list.", - "b. Restart the process from step 1.", - "3. If all pairs are in order, stop.For example, the list { 4 1 3 2 } is sorted as follows:", - "4 1 3 2 (4 and 1 are out of order so move 1 to the front of the list)", - "1 4 3 2 (4 and 3 are out of order so move 3 to the front of the list)", - "3 1 4 2 (3 and 1 are out of order so move 1 to the front of the list)", - "1 3 4 2 (4 and 2 are out of order so move 2 to the front of the list)", - "2 1 3 4 (2 and 1 are out of order so move 1 to the front of the list)", - "1 2 3 4 (The list is now sorted)Let F(L) be the number of times step 2a is executed to sort list L. For example, F({ 4 1 3 2 }) = 5.", - "", - "Let E(n) be the expected value of F(P) over all permutations P of the integers {1, 2, ..., n}.", - "You are given E(4) = 3.25 and E(10) = 115.725.", - "", - "Find E(30). Give your answer rounded to two digits after the decimal point." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler523() {", - " // Good luck!", - " return true;", - "}", - "", - "euler523();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fece58d9425c70af4f5e", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 524: First Sort II", - "tests": [ - { - "text": "euler524() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler524(), TODO: MISSING ANSWER, 'euler524() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Consider the following algorithm for sorting a list:", - "1. Starting from the beginning of the list, check each pair of adjacent elements in turn.", - "2. If the elements are out of order:", - "a. Move the smallest element of the pair at the beginning of the list.", - "b. Restart the process from step 1.", - "3. If all pairs are in order, stop.For example, the list { 4 1 3 2 } is sorted as follows:", - "4 1 3 2 (4 and 1 are out of order so move 1 to the front of the list)", - "1 4 3 2 (4 and 3 are out of order so move 3 to the front of the list)", - "3 1 4 2 (3 and 1 are out of order so move 1 to the front of the list)", - "1 3 4 2 (4 and 2 are out of order so move 2 to the front of the list)", - "2 1 3 4 (2 and 1 are out of order so move 1 to the front of the list)", - "1 2 3 4 (The list is now sorted)Let F(L) be the number of times step 2a is executed to sort list L. For example, F({ 4 1 3 2 }) = 5.", - "", - "We can list all permutations P of the integers {1, 2, ..., n} in lexicographical order, and assign to each permutation an index In(P) from 1 to n! corresponding to its position in the list.", - "", - "Let Q(n, k) = min(In(P)) for F(P) = k, the index of the first permutation requiring exactly k steps to sort with First Sort. If there is no permutation for which F(P) = k, then Q(n, k) is undefined.", - "", - "For n = 4 we have:", - "", - "PI4(P)F(P){1, 2, 3, 4}10Q(4, 0) = 1{1, 2, 4, 3}24Q(4, 4) = 2{1, 3, 2, 4}32Q(4, 2) = 3{1, 3, 4, 2}42{1, 4, 2, 3}56Q(4, 6) = 5{1, 4, 3, 2}64{2, 1, 3, 4}71Q(4, 1) = 7{2, 1, 4, 3}85Q(4, 5) = 8{2, 3, 1, 4}91{2, 3, 4, 1}101{2, 4, 1, 3}115{2, 4, 3, 1}123Q(4, 3) = 12{3, 1, 2, 4}133{3, 1, 4, 2}143{3, 2, 1, 4}152{3, 2, 4, 1}162{3, 4, 1, 2}173{3, 4, 2, 1}182{4, 1, 2, 3}197Q(4, 7) = 19{4, 1, 3, 2}205{4, 2, 1, 3}216{4, 2, 3, 1}224{4, 3, 1, 2}234{4, 3, 2, 1}243Let R(k) = min(Q(n, k)) over all n for which Q(n, k) is defined.", - "", - "Find R(1212)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler524() {", - " // Good luck!", - " return true;", - "}", - "", - "euler524();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fecf58d9425c70af4f5f", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 525: Rolling Ellipse", - "tests": [ - { - "text": "euler525() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler525(), TODO: MISSING ANSWER, 'euler525() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "An ellipse E(a, b) is given at its initial position by equation:", - "$\\frac {x^2} {a^2} + \\frac {(y - b)^2} {b^2} = 1$", - "", - "The ellipse rolls without slipping along the x axis for one complete turn. Interestingly, the length of the curve generated by a focus is independent from the size of the minor axis:", - "$F(a,b) = 2 \\pi \\text{ } max(a,b)$", - "", - "", - "", - "This is not true for the curve generated by the ellipse center. Let C(a,b) be the length of the curve generated by the center of the ellipse as it rolls without slipping for one turn.", - "", - "", - "", - "You are given C(2, 4) ~ 21.38816906.", - "", - "Find C(1, 4) + C(3, 4). Give your answer rounded to 8 digits behind the decimal point in the form ab.cdefghij." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler525() {", - " // Good luck!", - " return true;", - "}", - "", - "euler525();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fed058d9425c70af4f60", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 526: Largest prime factors of consecutive numbers", - "tests": [ - { - "text": "euler526() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler526(), TODO: MISSING ANSWER, 'euler526() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let f(n) be the largest prime factor of n.", - "Let g(n) = f(n) + f(n+1) + f(n+2) + f(n+3) + f(n+4) + f(n+5) + f(n+6) + f(n+7) + f(n+8), the sum of the largest prime factor of each of nine consecutive numbers starting with n.", - "Let h(n) be the maximum value of g(k) for 2 ≤ k ≤ n.", - "You are given:", - "f(100) = 5", - "f(101) = 101", - "g(100) = 409", - "h(100) = 417", - "h(109) = 4896292593Find h(1016)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler526() {", - " // Good luck!", - " return true;", - "}", - "", - "euler526();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fed158d9425c70af4f61", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 527: Randomized Binary Search", - "tests": [ - { - "text": "euler527() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler527(), TODO: MISSING ANSWER, 'euler527() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A secret integer t is selected at random within the range 1 ≤ t ≤ n. ", - "", - "The goal is to guess the value of t by making repeated guesses, via integer g. After a guess is made, there are three possible outcomes, in which it will be revealed that either g < t, g = t, or g > t. Then the process can repeat as necessary.", - "", - "Normally, the number of guesses required on average can be minimized with a binary search: Given a lower bound L and upper bound H (initialized to L = 1 and H = n), let g = ⌊(L+H)/2⌋ where ⌊⋅⌋ is the integer floor function. If g = t, the process ends. Otherwise, if g < t, set L = g+1, but if g > t instead, set H = g−1. After setting the new bounds, the search process repeats, and ultimately ends once t is found. Even if t can be deduced without searching, assume that a search will be required anyway to confirm the value.", - "", - "Your friend Bob believes that the standard binary search is not that much better than his randomized variant: Instead of setting g = ⌊(L+H)/2⌋, simply let g be a random integer between L and H, inclusive. The rest of the algorithm is the same as the standard binary search. This new search routine will be referred to as a random binary search.", - "", - "Given that 1 ≤ t ≤ n for random t, let B(n) be the expected number of guesses needed to find t using the standard binary search, and let R(n) be the expected number of guesses needed to find t using the random binary search. For example, B(6) = 2.33333333 and R(6) = 2.71666667 when rounded to 8 decimal places.", - "", - "Find R(1010) − B(1010) rounded to 8 decimal places." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler527() {", - " // Good luck!", - " return true;", - "}", - "", - "euler527();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fed258d9425c70af4f62", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 528: Constrained Sums", - "tests": [ - { - "text": "euler528() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler528(), TODO: MISSING ANSWER, 'euler528() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let S(n,k,b) represent the number of valid solutions to x1 + x2 + ... + xk ≤ n, where 0 ≤ xm ≤ bm for all 1 ≤ m ≤ k.", - "", - "For example, S(14,3,2) = 135, S(200,5,3) = 12949440, and S(1000,10,5) mod 1 000 000 007 = 624839075.", - "", - "Find (∑10 ≤ k ≤ 15 S(10k,k,k)) mod 1 000 000 007." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler528() {", - " // Good luck!", - " return true;", - "}", - "", - "euler528();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fed358d9425c70af4f63", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 529: 10-substrings", - "tests": [ - { - "text": "euler529() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler529(), TODO: MISSING ANSWER, 'euler529() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A 10-substring of a number is a substring of its digits that sum to 10. For example, the 10-substrings of the number 3523014 are:", - "3523014", - "3523014", - "3523014", - "3523014A number is called 10-substring-friendly if every one of its digits belongs to a 10-substring. For example, 3523014 is 10-substring-friendly, but 28546 is not.", - "Let T(n) be the number of 10-substring-friendly numbers from 1 to 10n (inclusive).", - "For example T(2) = 9 and T(5) = 3492.", - "Find T(1018) mod 1 000 000 007." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler529() {", - " // Good luck!", - " return true;", - "}", - "", - "euler529();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fed458d9425c70af4f64", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 530: GCD of Divisors", - "tests": [ - { - "text": "euler530() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler530(), TODO: MISSING ANSWER, 'euler530() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Every divisor d of a number n has a complementary divisor n/d.", - "", - "Let f(n) be the sum of the greatest common divisor of d and n/d over all positive divisors d of n, that is", - "$f(n)=\\displaystyle\\sum\\limits_{d|n}\\, \\text{gcd}(d,\\frac n d)$.", - "", - "Let F be the summatory function of f, that is", - "$F(k)=\\displaystyle\\sum\\limits_{n=1}^k \\, f(n)$.", - "", - "You are given that F(10)=32 and F(1000)=12776.", - "", - "Find F(1015)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler530() {", - " // Good luck!", - " return true;", - "}", - "", - "euler530();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fed558d9425c70af4f65", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 531: Chinese leftovers", - "tests": [ - { - "text": "euler531() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler531(), TODO: MISSING ANSWER, 'euler531() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let g(a,n,b,m) be the smallest non-negative solution x to the system:x = a mod nx = b mod m", - "if such a solution exists, otherwise 0.", - "", - "", - "E.g. g(2,4,4,6)=10, but g(3,4,4,6)=0.", - "", - "", - "Let φ(n) be Euler's totient function.", - "", - "", - "Let f(n,m)=g(φ(n),n,φ(m),m)", - "", - "", - "Find ∑f(n,m) for 1000000 ≤ n < m < 1005000" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler531() {", - " // Good luck!", - " return true;", - "}", - "", - "euler531();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fed658d9425c70af4f66", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 532: Nanobots on Geodesics", - "tests": [ - { - "text": "euler532() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler532(), TODO: MISSING ANSWER, 'euler532() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Bob is a manufacturer of nanobots and wants to impress his customers by giving them a ball colored by his new nanobots as a present.", - "", - "His nanobots can be programmed to select and locate exactly one other bot precisely and, after activation, move towards this bot along the shortest possible path and draw a colored line onto the surface while moving. Placed on a plane, the bots will start to move towards their selected bots in a straight line. In contrast, being placed on a ball, they will start to move along a geodesic as the shortest possible path. However, in both cases, whenever their target moves they will adjust their direction instantaneously to the new shortest possible path. All bots will move at the same speed after their simultaneous activation until each bot reaches its goal.", - "", - "Now Bob places n bots on the ball (with radius 1) equidistantly on a small circle with radius 0.999 and programs each of them to move toward the next nanobot sitting counterclockwise on that small circle. After activation, the bots move in a sort of spiral until they finally meet at one point on the ball.", - "", - "Using three bots, Bob finds that every bot will draw a line of length 2.84, resulting in a total length of 8.52 for all three bots, each time rounded to two decimal places. The colored ball looks like this:", - "", - "", - "", - "In order to show off a little with his presents, Bob decides to use just enough bots to make sure that the line each bot draws is longer than 1000. What is the total length of all lines drawn with this number of bots, rounded to two decimal places?" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler532() {", - " // Good luck!", - " return true;", - "}", - "", - "euler532();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fed758d9425c70af4f67", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 533: Minimum values of the Carmichael function", - "tests": [ - { - "text": "euler533() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler533(), TODO: MISSING ANSWER, 'euler533() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The Carmichael function λ(n) is defined as the smallest positive integer m such that am = 1 modulo n for all integers a coprime with n.", - "For example λ(8) = 2 and λ(240) = 4.", - "", - "Define L(n) as the smallest positive integer m such that λ(k) ≥ n for all k ≥ m.", - "For example, L(6) = 241 and L(100) = 20 174 525 281.", - "", - "Find L(20 000 000). Give the last 9 digits of your answer." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler533() {", - " // Good luck!", - " return true;", - "}", - "", - "euler533();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fed858d9425c70af4f68", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 534: Weak Queens", - "tests": [ - { - "text": "euler534() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler534(), TODO: MISSING ANSWER, 'euler534() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The classical eight queens puzzle is the well known problem of placing eight chess queens on a 8×8 chessboard so that no two queens threaten each other. Allowing configurations to reappear in rotated or mirrored form, a total of 92 distinct configurations can be found for eight queens. The general case asks for the number of distinct ways of placing n queens on a n×n board, e.g. you can find 2 distinct configurations for n=4.", - "", - "Lets define a weak queen on a n×n board to be a piece which can move any number of squares if moved horizontally, but a maximum of n−1−w squares if moved vertically or diagonally, 0≤weuler535() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler535(), TODO: MISSING ANSWER, 'euler535() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Consider the infinite integer sequence S starting with:S = 1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 8, 4, 9, 1, 10, 11, 5, ...", - "", - "Circle the first occurrence of each integer.S = ①, 1, ②, 1, ③, 2, ④, 1, ⑤, 3, ⑥, 2, ⑦, ⑧, 4, ⑨, 1, ⑩, ⑪, 5, ...", - "", - "The sequence is characterized by the following properties:", - "The circled numbers are consecutive integers starting with 1.", - "Immediately preceding each non-circled numbers ai, there are exactly ⌊√ai⌋ adjacent circled numbers, where ⌊⌋ is the floor function.", - "If we remove all circled numbers, the remaining numbers form a sequence identical to S, so S is a fractal sequence.Let T(n) be the sum of the first n elements of the sequence.", - "You are given T(1) = 1, T(20) = 86, T(103) = 364089 and T(109) = 498676527978348241.", - "", - "Find T(1018). Give the last 9 digits of your answer." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler535() {", - " // Good luck!", - " return true;", - "}", - "", - "euler535();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900feda58d9425c70af4f6a", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 536: Modulo power identity", - "tests": [ - { - "text": "euler536() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler536(), TODO: MISSING ANSWER, 'euler536() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let S(n) be the sum of all positive integers m not exceeding n having the following property:a m+4 ≡ a (mod m) for all integers a.", - "", - "", - "The values of m ≤ 100 that satisfy this property are 1, 2, 3, 5 and 21, thus S(100) = 1+2+3+5+21 = 32.", - "You are given S(106) = 22868117.", - "", - "", - "Find S(1012)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler536() {", - " // Good luck!", - " return true;", - "}", - "", - "euler536();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fedb58d9425c70af4f6b", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 537: Counting tuples", - "tests": [ - { - "text": "euler537() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler537(), TODO: MISSING ANSWER, 'euler537() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let π(x) be the prime counting function, i.e. the number of prime numbers less than or equal to x.", - "For example, π(1)=0, π(2)=1, π(100)=25.", - "", - "", - "Let T(n,k) be the number of k-tuples (x1,…,xk) which satisfy:", - "1. every xi is a positive integer;", - "2. $\\displaystyle \\sum_{i=1}^k \\pi(x_i)=n$", - "", - "", - "For example T(3,3)=19.", - "The 19 tuples are (1,1,5), (1,5,1), (5,1,1), (1,1,6), (1,6,1), (6,1,1), (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1), (1,2,4), (1,4,2), (2,1,4), (2,4,1), (4,1,2), (4,2,1), (2,2,2).", - "", - "", - "You are given T(10,10) = 869 985 and T(103,103) ≡ 578 270 566 (mod 1 004 535 809).", - "", - "Find T(20 000, 20 000) mod 1 004 535 809." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler537() {", - " // Good luck!", - " return true;", - "}", - "", - "euler537();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fedc58d9425c70af4f6c", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 538: Maximum quadrilaterals", - "tests": [ - { - "text": "euler538() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler538(), TODO: MISSING ANSWER, 'euler538() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Consider a positive integer sequence S = (s1, s2, ..., sn).", - "", - "Let f(S) be the perimeter of the maximum-area quadrilateral whose side lengths are 4 elements (si, sj, sk, sl) of S (all i, j, k, l distinct). If there are many quadrilaterals with the same maximum area, then choose the one with the largest perimeter.", - "", - "For example, if S = (8, 9, 14, 9, 27), then we can take the elements (9, 14, 9, 27) and form an isosceles trapezium with parallel side lengths 14 and 27 and both leg lengths 9. The area of this quadrilateral is 127.611470879... It can be shown that this is the largest area for any quadrilateral that can be formed using side lengths from S. Therefore, f(S) = 9 + 14 + 9 + 27 = 59.", - "", - "Let un = 2B(3n) + 3B(2n) + B(n+1), where B(k) is the number of 1 bits of k in base 2.", - "For example, B(6) = 2, B(10) = 2 and B(15) = 4, and u5 = 24 + 32 + 2 = 27.", - "", - "Also, let Un be the sequence (u1, u2, ..., un).", - "For example, U10 = (8, 9, 14, 9, 27, 16, 36, 9, 27, 28).", - "", - "It can be shown that f(U5) = 59, f(U10) = 118, f(U150) = 3223.", - "It can also be shown that Σ f(Un) = 234761 for 4 ≤ n ≤ 150.", - "Find Σ f(Un) for 4 ≤ n ≤ 3 000 000." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler538() {", - " // Good luck!", - " return true;", - "}", - "", - "euler538();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fedd58d9425c70af4f6d", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 539: Odd elimination", - "tests": [ - { - "text": "euler539() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler539(), TODO: MISSING ANSWER, 'euler539() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Start from an ordered list of all integers from 1 to n. Going from left to right, remove the first number and every other number afterward until the end of the list. Repeat the procedure from right to left, removing the right most number and every other number from the numbers left. Continue removing every other numbers, alternating left to right and right to left, until a single number remains.", - "", - "", - "Starting with n = 9, we have:1 2 3 4 5 6 7 8 9", - "2 4 6 82 6", - "6", - "", - "", - "Let P(n) be the last number left starting with a list of length n.", - "Let $\\displaystyle S(n) = \\sum_{k=1}^n P(k)$.", - "You are given P(1)=1, P(9) = 6, P(1000)=510, S(1000)=268271.", - "", - "", - "Find S(1018) mod 987654321." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler539() {", - " // Good luck!", - " return true;", - "}", - "", - "euler539();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fede58d9425c70af4f6e", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 540: Counting primitive Pythagorean triples", - "tests": [ - { - "text": "euler540() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler540(), TODO: MISSING ANSWER, 'euler540() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A Pythagorean triple consists of three positive integers $a, b$ and $c$ satisfying $a^2+b^2=c^2$.", - "The triple is called primitive if $a, b$ and $c$ are relatively prime.", - "Let P($n$) be the number of primitive Pythagorean triples with $a < b < c <= n$.", - "For example P(20) = 3, since there are three triples: (3,4,5), (5,12,13) and (8,15,17).", - "", - "", - "You are given that P(106) = 159139.", - "Find P(3141592653589793)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler540() {", - " // Good luck!", - " return true;", - "}", - "", - "euler540();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fedf58d9425c70af4f6f", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 541: Divisibility of Harmonic Number Denominators", - "tests": [ - { - "text": "euler541() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler541(), TODO: MISSING ANSWER, 'euler541() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The nthharmonic number Hn is defined as the sum of the multiplicative inverses of the first n positive integers, and can be written as a reduced fraction an/bn.", - "$H_n = \\displaystyle \\sum_{k=1}^n \\frac 1 k = \\frac {a_n} {b_n}$, with $\\text {gcd}(a_n, b_n)=1$.", - "", - "Let M(p) be the largest value of n such that bn is not divisible by p.", - "", - "For example, M(3) = 68 because $H_{68} = \\frac {a_{68}} {b_{68}} = \\frac {14094018321907827923954201611} {2933773379069966367528193600}$, b68=2933773379069966367528193600 is not divisible by 3, but all larger harmonic numbers have denominators divisible by 3.", - "", - "You are given M(7) = 719102.", - "", - "Find M(137)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler541() {", - " // Good luck!", - " return true;", - "}", - "", - "euler541();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee058d9425c70af4f70", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 542: Geometric Progression with Maximum Sum", - "tests": [ - { - "text": "euler542() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler542(), TODO: MISSING ANSWER, 'euler542() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let S(k) be the sum of three or more distinct positive integers having the following properties:", - "No value exceeds k.", - "The values form a geometric progression.", - "The sum is maximal.S(4) = 4 + 2 + 1 = 7S(10) = 9 + 6 + 4 = 19S(12) = 12 + 6 + 3 = 21S(1000) = 1000 + 900 + 810 + 729 = 3439", - "", - "Let $T(n) = \\sum_{k=4}^n (-1)^k S(k)$.T(1000) = 2268", - "", - "Find T(1017)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler542() {", - " // Good luck!", - " return true;", - "}", - "", - "euler542();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee158d9425c70af4f71", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 543: Prime-Sum Numbers", - "tests": [ - { - "text": "euler543() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler543(), TODO: MISSING ANSWER, 'euler543() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Define function P(n,k) = 1 if n can be written as the sum of k prime numbers (with repetitions allowed), and P(n,k) = 0 otherwise.", - "", - "For example, P(10,2) = 1 because 10 can be written as either 3 + 7 or 5 + 5, but P(11,2) = 0 because no two primes can sum to 11.", - "", - "Let S(n) be the sum of all P(i,k) over 1 ≤ i,k ≤ n.", - "", - "For example, S(10) = 20, S(100) = 2402, and S(1000) = 248838.", - "", - "Let F(k) be the kth Fibonacci number (with F(0) = 0 and F(1) = 1).", - "", - "Find the sum of all S(F(k)) over 3 ≤ k ≤ 44" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler543() {", - " // Good luck!", - " return true;", - "}", - "", - "euler543();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee258d9425c70af4f72", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 544: Chromatic Conundrum", - "tests": [ - { - "text": "euler544() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler544(), TODO: MISSING ANSWER, 'euler544() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let F(r,c,n) be the number of ways to color a rectangular grid with r rows and c columns using at most n colors such that no two adjacent cells share the same color. Cells that are diagonal to each other are not considered adjacent.", - "", - "For example, F(2,2,3) = 18, F(2,2,20) = 130340, and F(3,4,6) = 102923670.", - "", - "Let S(r,c,n) = $\\sum_{k=1}^{n}$ F(r,c,k).", - "", - "For example, S(4,4,15) mod 109+7 = 325951319.", - "", - "Find S(9,10,1112131415) mod 109+7." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler544() {", - " // Good luck!", - " return true;", - "}", - "", - "euler544();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee358d9425c70af4f73", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 545: Faulhaber's Formulas", - "tests": [ - { - "text": "euler545() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler545(), TODO: MISSING ANSWER, 'euler545() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The sum of the kth powers of the first n positive integers can be expressed as a polynomial of degree k+1 with rational coefficients, the Faulhaber's Formulas:", - "$1^k + 2^k + ... + n^k = \\sum_{i=1}^n i^k = \\sum_{i=1}^{k+1} a_{i} n^i = a_{1} n + a_{2} n^2 + ... + a_{k} n^k + a_{k+1} n^{k + 1}$,", - "where ai's are rational coefficients that can be written as reduced fractions pi/qi (if ai = 0, we shall consider qi = 1).", - "", - "For example, $1^4 + 2^4 + ... + n^4 = -\\frac 1 {30} n + \\frac 1 3 n^3 + \\frac 1 2 n^4 + \\frac 1 5 n^5.$", - "", - "Define D(k) as the value of q1 for the sum of kth powers (i.e. the denominator of the reduced fraction a1).", - "Define F(m) as the mth value of k ≥ 1 for which D(k) = 20010.", - "You are given D(4) = 30 (since a1 = -1/30), D(308) = 20010, F(1) = 308, F(10) = 96404.", - "", - "Find F(105)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler545() {", - " // Good luck!", - " return true;", - "}", - "", - "euler545();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee458d9425c70af4f74", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 546: The Floor's Revenge", - "tests": [ - { - "text": "euler546() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler546(), TODO: MISSING ANSWER, 'euler546() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Define fk(n) = $\\sum_{i=0}^{n}$ fk($\\lfloor\\frac{i}{k}\\rfloor$) where fk(0) = 1 and $\\lfloor x \\rfloor$ denotes the floor function.", - "", - "For example, f5(10) = 18, f7(100) = 1003, and f2(103) = 264830889564.", - "", - "Find $(\\sum_{k=2}^{10}$ fk(1014)$)$ mod (109+7)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler546() {", - " // Good luck!", - " return true;", - "}", - "", - "euler546();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee558d9425c70af4f75", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 547: Distance of random points within hollow square laminae", - "tests": [ - { - "text": "euler547() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler547(), TODO: MISSING ANSWER, 'euler547() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Assuming that two points are chosen randomly (with uniform distribution) within a rectangle, it is possible to determine the expected value of the distance between these two points.", - "", - "For example, the expected distance between two random points in a unit square is about 0.521405, while the expected distance between two random points in a rectangle with side lengths 2 and 3 is about 1.317067.", - "", - "Now we define a hollow square lamina of size n to be an integer sized square with side length n ≥ 3 consisting of n2 unit squares from which a rectangle consisting of x × y unit squares (1 ≤ x,y ≤ n - 2) within the original square has been removed.", - "", - "For n = 3 there exists only one hollow square lamina:", - "", - "", - "", - "For n = 4 you can find 9 distinct hollow square laminae, allowing shapes to reappear in rotated or mirrored form:", - "", - "", - "", - "Let S(n) be the sum of the expected distance between two points chosen randomly within each of the possible hollow square laminae of size n. The two points have to lie within the area left after removing the inner rectangle, i.e. the gray-colored areas in the illustrations above.", - "", - "For example, S(3) = 1.6514 and S(4) = 19.6564, rounded to four digits after the decimal point.", - "", - "Find S(40) rounded to four digits after the decimal point." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler547() {", - " // Good luck!", - " return true;", - "}", - "", - "euler547();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee658d9425c70af4f76", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 548: Gozinta Chains", - "tests": [ - { - "text": "euler548() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler548(), TODO: MISSING ANSWER, 'euler548() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A gozinta chain for n is a sequence {1,a,b,...,n} where each element properly divides the next.", - "There are eight gozinta chains for 12:", - "{1,12} ,{1,2,12}, {1,2,4,12}, {1,2,6,12}, {1,3,12}, {1,3,6,12}, {1,4,12} and {1,6,12}. ", - "Let g(n) be the number of gozinta chains for n, so g(12)=8.", - "g(48)=48 and g(120)=132.", - "", - "", - "Find the sum of the numbers n not exceeding 1016 for which g(n)=n." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler548() {", - " // Good luck!", - " return true;", - "}", - "", - "euler548();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee758d9425c70af4f77", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 549: Divisibility of factorials", - "tests": [ - { - "text": "euler549() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler549(), TODO: MISSING ANSWER, 'euler549() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The smallest number m such that 10 divides m! is m=5.", - "The smallest number m such that 25 divides m! is m=10.", - "", - "Let s(n) be the smallest number m such that n divides m!.", - "So s(10)=5 and s(25)=10.", - "Let S(n) be ∑s(i) for 2 ≤ i ≤ n.", - "S(100)=2012.", - "", - "", - "Find S(108)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler549() {", - " // Good luck!", - " return true;", - "}", - "", - "euler549();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee858d9425c70af4f78", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 550: Divisor game", - "tests": [ - { - "text": "euler550() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler550(), TODO: MISSING ANSWER, 'euler550() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Two players are playing a game. There are k piles of stones.", - "When it is his turn a player has to choose a pile and replace it by two piles of stones under the following two conditions:", - "", - "", - " Both new piles must have a number of stones more than one and less than the number of stones of the original pile.", - " The number of stones of each of the new piles must be a divisor of the number of stones of the original pile.", - "The first player unable to make a valid move loses.", - "", - "Let f(n,k) be the number of winning positions for the first player, assuming perfect play, when the game is played with k piles each having between 2 and n stones (inclusively).f(10,5)=40085.", - "", - "", - "Find f(107,1012).Give your answer modulo 987654321." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler550() {", - " // Good luck!", - " return true;", - "}", - "", - "euler550();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fee958d9425c70af4f79", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 551: Sum of digits sequence", - "tests": [ - { - "text": "euler551() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler551(), TODO: MISSING ANSWER, 'euler551() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let a0, a1, a2, ... be an integer sequence defined by:", - "a0 = 1;", - "for n ≥ 1, an is the sum of the digits of all preceding terms.", - "The sequence starts with 1, 1, 2, 4, 8, 16, 23, 28, 38, 49, ...", - "You are given a106 = 31054319.", - "Find a1015." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler551() {", - " // Good luck!", - " return true;", - "}", - "", - "euler551();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900feea58d9425c70af4f7a", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 552: Chinese leftovers II", - "tests": [ - { - "text": "euler552() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler552(), TODO: MISSING ANSWER, 'euler552() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let An be the smallest positive integer satisfying An mod pi = i for all 1 ≤ i ≤ n, where pi is the", - "i-th prime.", - "For example A2 = 5, since this is the smallest positive solution of the system of equations ", - " A2 mod 2 = 1 ", - " A2 mod 3 = 2", - "The system of equations for A3 adds another constraint. That is, A3 is the smallest positive solution of", - " A3 mod 2 = 1 ", - " A3 mod 3 = 2", - " A3 mod 5 = 3", - "and hence A3 = 23. Similarly, one gets A4 = 53 and A5 = 1523.", - "", - "", - "Let S(n) be the sum of all primes up to n that divide at least one element in the sequence A.", - "For example, S(50) = 69 = 5 + 23 + 41, since 5 divides A2, 23 divides A3 and 41 divides A10 = 5765999453. No other prime number up to 50 divides an element in A.", - "", - "", - "Find S(300000)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler552() {", - " // Good luck!", - " return true;", - "}", - "", - "euler552();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900feeb58d9425c70af4f7b", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 553: Power sets of power sets", - "tests": [ - { - "text": "euler553() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler553(), TODO: MISSING ANSWER, 'euler553() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let P(n) be the set of the first n positive integers {1, 2, ..., n}.", - "Let Q(n) be the set of all the non-empty subsets of P(n).", - "Let R(n) be the set of all the non-empty subsets of Q(n).", - "", - "An element X ∈ R(n) is a non-empty subset of Q(n), so it is itself a set.", - "From X we can construct a graph as follows:", - "", - "Each element Y ∈ X corresponds to a vertex and labeled with Y;", - "Two vertices Y1 and Y2 are connected if Y1 ∩ Y2 ≠ ∅.", - "For example, X = {{1}, {1,2,3}, {3}, {5,6}, {6,7}} results in the following graph:", - "", - "", - "", - "This graph has two connected components.", - "", - "Let C(n,k) be the number of elements of R(n) that have exactly k connected components in their graph.", - "You are given C(2,1) = 6, C(3,1) = 111, C(4,2) = 486, C(100,10) mod 1 000 000 007 = 728209718.", - "", - "Find C(104,10) mod 1 000 000 007." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler553() {", - " // Good luck!", - " return true;", - "}", - "", - "euler553();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900feec58d9425c70af4f7c", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 554: Centaurs on a chess board", - "tests": [ - { - "text": "euler554() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler554(), TODO: MISSING ANSWER, 'euler554() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "On a chess board, a centaur moves like a king or a knight. The diagram below shows the valid moves of a centaur (represented by an inverted king) on an 8x8 board.", - "", - "", - "", - "It can be shown that at most n2 non-attacking centaurs can be placed on a board of size 2n×2n.", - "Let C(n) be the number of ways to place n2 centaurs on a 2n×2n board so that no centaur attacks another directly.", - "For example C(1) = 4, C(2) = 25, C(10) = 1477721.", - "", - "Let Fi be the ith Fibonacci number defined as F1 = F2 = 1 and Fi = Fi-1 + Fi-2 for i > 2.", - "", - "Find $\\displaystyle \\left( \\sum_{i=2}^{90} C(F_i) \\right) \\text{mod } (10^8+7)$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler554() {", - " // Good luck!", - " return true;", - "}", - "", - "euler554();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900feed58d9425c70af4f7d", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 555: McCarthy 91 function", - "tests": [ - { - "text": "euler555() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler555(), TODO: MISSING ANSWER, 'euler555() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The McCarthy 91 function is defined as follows:", - "$$", - "M_{91}(n) = ", - " \\begin{cases}", - " n - 10 & \\text{if } n > 100 \\\\", - " M_{91}(M_{91}(n+11)) & \\text{if } 0 \\leq n \\leq 100", - " \\end{cases}", - "$$", - "", - "", - "We can generalize this definition by abstracting away the constants into new variables:", - "", - "$$", - "M_{m,k,s}(n) = ", - " \\begin{cases}", - " n - s & \\text{if } n > m \\\\", - " M_{m,k,s}(M_{m,k,s}(n+k)) & \\text{if } 0 \\leq n \\leq m", - " \\end{cases}", - "$$", - "", - "", - "This way, we have $M_{91} = M_{100,11,10}$.", - "", - "", - "Let $F_{m,k,s}$ be the set of fixed points of $M_{m,k,s}$. That is, ", - "", - "$$F_{m,k,s}= \\left\\{ n \\in \\mathbb{N} \\, | \\, M_{m,k,s}(n) = n \\right\\}$$", - "", - "", - "For example, the only fixed point of $M_{91}$ is $n = 91$. In other words, $F_{100,11,10}= \\{91\\}$.", - " ", - "", - "Now, define $SF(m,k,s)$ as the sum of the elements in $F_{m,k,s}$ and let $S(p,m) = \\displaystyle \\sum_{1 \\leq s < k \\leq p}{SF(m,k,s)}$.", - "", - "", - "For example, $S(10, 10) = 225$ and $S(1000, 1000)=208724467$.", - "", - "", - "Find $S(10^6, 10^6)$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler555() {", - " // Good luck!", - " return true;", - "}", - "", - "euler555();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900feee58d9425c70af4f7e", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 556: Squarefree Gaussian Integers", - "tests": [ - { - "text": "euler556() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler556(), TODO: MISSING ANSWER, 'euler556() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A Gaussian integer is a number z = a + bi where a, b are integers and i2 = -1.", - "Gaussian integers are a subset of the complex numbers, and the integers are the subset of Gaussian integers for which b = 0.", - "", - "A Gaussian integer unit is one for which a2 + b2 = 1, i.e. one of 1, i, -1, -i.", - "Let's define a proper Gaussian integer as one for which a > 0 and b ≥ 0.", - "", - "A Gaussian integer z1 = a1 + b1i is said to be divisible by z2 = a2 + b2i if z3 = a3 + b3i = z1/z2 is a Gaussian integer.", - "$\\frac {z_1} {z_2} = \\frac {a_1 + b_1 i} {a_2 + b_2 i} = \\frac {(a_1 + b_1 i)(a_2 - b_2 i)} {(a_2 + b_2 i)(a_2 - b_2 i)} = \\frac {a_1 a_2 + b_1 b_2} {a_2^2 + b_2^2} + \\frac {a_2 b_1 - a_1 b_2} {a_2^2 + b_2^2}i = a_3 + b_3 i$", - "So, z1 is divisible by z2 if $\\frac {a_1 a_2 + b_1 b_2} {a_2^2 + b_2^2}$ and $\\frac {a_2 b_1 - a_1 b_2} {a_2^2 + b_2^2}$ are integers.", - "For example, 2 is divisible by 1 + i because 2/(1 + i) = 1 - i is a Gaussian integer.", - "", - "A Gaussian prime is a Gaussian integer that is divisible only by a unit, itself or itself times a unit.", - "For example, 1 + 2i is a Gaussian prime, because it is only divisible by 1, i, -1, -i, 1 + 2i, i(1 + 2i) = i - 2, -(1 + 2i) = -1 - 2i and -i(1 + 2i) = 2 - i.", - "2 is not a Gaussian prime as it is divisible by 1 + i.", - "", - "A Gaussian integer can be uniquely factored as the product of a unit and proper Gaussian primes.", - "For example 2 = -i(1 + i)2 and 1 + 3i = (1 + i)(2 + i).", - "A Gaussian integer is said to be squarefree if its prime factorization does not contain repeated proper Gaussian primes.", - "So 2 is not squarefree over the Gaussian integers, but 1 + 3i is.", - "Units and Gaussian primes are squarefree by definition.", - "", - "Let f(n) be the count of proper squarefree Gaussian integers with a2 + b2 ≤ n.", - "For example f(10) = 7 because 1, 1 + i, 1 + 2i, 1 + 3i = (1 + i)(2 + i), 2 + i, 3 and 3 + i = -i(1 + i)(1 + 2i) are squarefree, while 2 = -i(1 + i)2 and 2 + 2i = -i(1 + i)3 are not.", - "You are given f(102) = 54, f(104) = 5218 and f(108) = 52126906.", - "", - "Find f(1014)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler556() {", - " // Good luck!", - " return true;", - "}", - "", - "euler556();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900feef58d9425c70af4f7f", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 557: Cutting triangles", - "tests": [ - { - "text": "euler557() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler557(), TODO: MISSING ANSWER, 'euler557() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A triangle is cut into four pieces by two straight lines, each starting at one vertex and ending on the opposite edge. This results in forming three smaller triangular pieces, and one quadrilateral. If the original triangle has an integral area, it is often possible to choose cuts such that all of the four pieces also have integral area. For example, the diagram below shows a triangle of area 55 that has been cut in this way.", - "", - "", - "", - "Representing the areas as a, b, c and d, in the example above, the individual areas are a = 22, b = 8, c = 11 and d = 14. It is also possible to cut a triangle of area 55 such that a = 20, b = 2, c = 24, d = 9.", - "", - "Define a triangle cutting quadruple (a, b, c, d) as a valid integral division of a triangle, where a is the area of the triangle between the two cut vertices, d is the area of the quadrilateral and b and c are the areas of the two other triangles, with the restriction that b ≤ c. The two solutions described above are (22,8,11,14) and (20,2,24,9). These are the only two possible quadruples that have a total area of 55.", - "", - "", - "Define S(n) as the sum of the area of the uncut triangles represented by all valid quadruples with a+b+c+d ≤ n. For example, S(20) = 259. ", - "", - "", - "Find S(10000)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler557() {", - " // Good luck!", - " return true;", - "}", - "", - "euler557();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fef058d9425c70af4f80", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 558: Irrational base", - "tests": [ - { - "text": "euler558() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler558(), TODO: MISSING ANSWER, 'euler558() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let r be the real root of the equation x3 = x2 + 1.", - "Every positive integer can be written as the sum of distinct increasing powers of r.", - "If we require the number of terms to be finite and the difference between any two exponents to be three or more, then the representation is unique.", - "For example, 3 = r -10 + r -5 + r -1 + r 2 and 10 = r -10 + r -7 + r 6.", - "Interestingly, the relation holds for the complex roots of the equation.", - "", - "Let w(n) be the number of terms in this unique representation of n. Thus w(3) = 4 and w(10) = 3.", - "", - "More formally, for all positive integers n, we have:n = $\\displaystyle \\sum_{k=-\\infty}^{\\infty}$ bk rk", - "under the conditions that:bk is 0 or 1 for all k;bk + bk+1 + bk+2 ≤ 1 for all k;w(n) = $\\displaystyle \\sum_{k=-\\infty}^{\\infty}$ bk is finite.", - "", - "Let S(m) = $\\displaystyle \\sum_{j=1}^{m}$ w(j2).", - "You are given S(10) = 61 and S(1000) = 19403.", - "", - "Find S(5 000 000)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler558() {", - " // Good luck!", - " return true;", - "}", - "", - "euler558();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fef158d9425c70af4f81", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 559: Permuted Matrices", - "tests": [ - { - "text": "euler559() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler559(), TODO: MISSING ANSWER, 'euler559() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "An ascent of a column j in a matrix occurs if the value of column j is smaller than the value of column j+1 in all rows.", - "", - "Let P(k, r, n) be the number of r x n matrices with the following properties:", - "", - "The rows are permutations of {1, 2, 3, ... , n}.", - " Numbering the first column as 1, a column ascent occurs at column jeuler560() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler560(), TODO: MISSING ANSWER, 'euler560() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Coprime Nim is just like ordinary normal play Nim, but the players may only remove a number of stones from a pile that is coprime with the current size of the pile. Two players remove stones in turn. The player who removes the last stone wins.", - "", - "Let L(n, k) be the number of losing starting positions for the first player, assuming perfect play, when the game is played with k piles, each having between 1 and n - 1 stones inclusively.", - "", - "For example, L(5, 2) = 6 since the losing initial positions are (1, 1), (2, 2), (2, 4), (3, 3), (4, 2) and (4, 4).", - "You are also given L(10, 5) = 9964, L(10, 10) = 472400303, L(103, 103) mod 1 000 000 007 = 954021836.", - "", - "Find L(107, 107) mod 1 000 000 007" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler560() {", - " // Good luck!", - " return true;", - "}", - "", - "euler560();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fef358d9425c70af4f83", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 561: Divisor Pairs", - "tests": [ - { - "text": "euler561() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler561(), TODO: MISSING ANSWER, 'euler561() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let $S(n)$ be the number of pairs $(a,b)$ of distinct divisors of $n$ such that $a$ divides $b$.", - "For $n=6$ we get the following pairs: $(1,2), (1,3), (1,6),( 2,6)$ and $(3,6)$. So $S(6)=5$.", - "Let $p_m\\#$ be the product of the first $m$ prime numbers, so $p_2\\# = 2*3 = 6$.", - "Let $E(m, n)$ be the highest integer $k$ such that $2^k$ divides $S((p_m\\#)^n)$.", - "$E(2,1) = 0$ since $2^0$ is the highest power of 2 that divides S(6)=5.", - "Let $Q(n)=\\sum_{i=1}^{n} E(904961, i)$", - "$Q(8)=2714886$.", - "", - "", - "Evaluate $Q(10^{12})$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler561() {", - " // Good luck!", - " return true;", - "}", - "", - "euler561();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fef458d9425c70af4f84", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 562: Maximal perimeter", - "tests": [ - { - "text": "euler562() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler562(), TODO: MISSING ANSWER, 'euler562() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Construct triangle ABC such that:", - "Vertices A, B and C are lattice points inside or on the circle of radius r centered at the origin;", - "the triangle contains no other lattice point inside or on its edges;", - "the perimeter is maximum.Let R be the circumradius of triangle ABC and T(r) = R/r.", - "For r = 5, one possible triangle has vertices (-4,-3), (4,2) and (1,0) with perimeter $\\sqrt{13}+\\sqrt{34}+\\sqrt{89}$ and circumradius R = $\\sqrt {\\frac {19669} 2 }$, so T(5) =$\\sqrt {\\frac {19669} {50} }$.", - "You are given T(10) ~ 97.26729 and T(100) ~ 9157.64707.", - "", - "Find T(107). Give your answer rounded to the nearest integer." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler562() {", - " // Good luck!", - " return true;", - "}", - "", - "euler562();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fef558d9425c70af4f85", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 563: Robot Welders", - "tests": [ - { - "text": "euler563() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler563(), TODO: MISSING ANSWER, 'euler563() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A company specialises in producing large rectangular metal sheets, starting from unit square metal plates. The welding is performed by a range of robots of increasing size. Unfortunately, the programming options of these robots are rather limited. Each one can only process up to 25 identical rectangles of metal, which they can weld along either edge to produce a larger rectangle. The only programmable variables are the number of rectangles to be processed (up to and including 25), and whether to weld the long or short edge.", - "", - "For example, the first robot could be programmed to weld together 11 raw unit square plates to make a 11×1 strip. The next could take 10 of these 11×1 strips, and weld them either to make a longer 110×1 strip, or a 11×10 rectangle. Many, but not all, possible dimensions of metal sheets can be constructed in this way.", - "", - "One regular customer has a particularly unusual order. He always demands that the finished product should have an exact area, and that the long side must not be more than 10% larger than the short side. If these requirements can be met in more than one way, in terms of the exact dimensions of the two sides, then he demands that all variants are produced. For example, if he were to ask for metal sheet of area 889200, then there are three final dimensions that can be produced: 900×988, 912×975 and 936×950. The target area of 889200 is the smallest area which can be manufactured in three different variants, within the limitations of the robot welders.", - "", - "Let M(n) be the minimal area that can be manufactured in exactly n variants with the longer edge not greater than 10% bigger than the shorter edge. Hence M(3) = 889200.", - "", - "Find $ \\sum_{n=2}^{100} M(n)$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler563() {", - " // Good luck!", - " return true;", - "}", - "", - "euler563();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fef658d9425c70af4f86", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 564: Maximal polygons", - "tests": [ - { - "text": "euler564() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler564(), TODO: MISSING ANSWER, 'euler564() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A line segment of length $2n-3$ is randomly split into $n$ segments of integer length ($n \\ge 3$). In the sequence given by this split, the segments are then used as consecutive sides of a convex $n$-polygon, formed in such a way that its area is maximal. All of the $\\binom{2n-4} {n-1}$ possibilities for splitting up the initial line segment occur with the same probability. ", - "", - "Let $E(n)$ be the expected value of the area that is obtained by this procedure.", - "For example, for $n=3$ the only possible split of the line segment of length $3$ results in three line segments with length $1$, that form an equilateral triangle with an area of $\\frac 1 4 \\sqrt{3}$. Therefore $E(3)=0.433013$, rounded to $6$ decimal places.", - "For $n=4$ you can find $4$ different possible splits, each of which is composed of three line segments with length $1$ and one line segment with length $2$. All of these splits lead to the same maximal quadrilateral with an area of $\\frac 3 4 \\sqrt{3}$, thus $E(4)=1.299038$, rounded to $6$ decimal places.", - "", - "Let $S(k)=\\displaystyle \\sum_{n=3}^k E(n)$.", - "For example, $S(3)=0.433013$, $S(4)=1.732051$, $S(5)=4.604767$ and $S(10)=66.955511$, rounded to $6$ decimal places each.", - "", - "Find $S(50)$, rounded to $6$ decimal places." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler564() {", - " // Good luck!", - " return true;", - "}", - "", - "euler564();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fef758d9425c70af4f87", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 565: Divisibility of sum of divisors", - "tests": [ - { - "text": "euler565() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler565(), TODO: MISSING ANSWER, 'euler565() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let $\\sigma(n)$ be the sum of the divisors of $n$.", - "E.g. the divisors of 4 are 1, 2 and 4, so $\\sigma(4)=7$.", - "", - "", - "The numbers $n$ not exceeding 20 such that 7 divides $\\sigma(n)$ are: 4,12,13 and 20, the sum of these numbers being 49.", - "", - "", - "Let $S(n , d)$ be the sum of the numbers $i$ not exceeding $n$ such that $d$ divides $\\sigma(i)$.", - "So $S(20 , 7)=49$.", - "", - "", - "", - "You are given: $S(10^6,2017)=150850429$ and $S(10^9 , 2017)=249652238344557$.", - "", - "", - "Find $S(10^{11} , 2017)$" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler565() {", - " // Good luck!", - " return true;", - "}", - "", - "euler565();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fef858d9425c70af4f88", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 566: Cake Icing Puzzle", - "tests": [ - { - "text": "euler566() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler566(), TODO: MISSING ANSWER, 'euler566() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Adam plays the following game with his birthday cake.", - "", - "He cuts a piece forming a circular sector of 60 degrees and flips the piece upside down, with the icing on the bottom.", - "He then rotates the cake by 60 degrees counterclockwise, cuts an adjacent 60 degree piece and flips it upside down.", - "He keeps repeating this, until after a total of twelve steps, all the icing is back on top.", - "", - "Amazingly, this works for any piece size, even if the cutting angle is an irrational number: all the icing will be back on top after a finite number of steps.", - "", - "Now, Adam tries something different: he alternates cutting pieces of size $x=\\frac{360}{9}$ degrees, $y=\\frac{360}{10}$ degrees and $z=\\frac{360 }{\\sqrt{11}}$ degrees. The first piece he cuts has size x and he flips it. The second has size y and he flips it. The third has size z and he flips it. He repeats this with pieces of size x, y and z in that order until all the icing is back on top, and discovers he needs 60 flips altogether.", - "", - "", - "", - "Let F(a, b, c) be the minimum number of piece flips needed to get all the icing back on top for pieces of size $x=\\frac{360}{a}$ degrees, $y=\\frac{360}{b}$ degrees and $z=\\frac{360}{\\sqrt{c}}$ degrees.", - "Let $G(n) = \\sum_{9 \\le a < b < c \\le n} F(a,b,c)$, for integers a, b and c.", - "", - "You are given that F(9, 10, 11) = 60, F(10, 14, 16) = 506, F(15, 16, 17) = 785232.", - "You are also given G(11) = 60, G(14) = 58020 and G(17) = 1269260.", - "", - "Find G(53)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler566() {", - " // Good luck!", - " return true;", - "}", - "", - "euler566();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fef958d9425c70af4f89", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 567: Reciprocal games I", - "tests": [ - { - "text": "euler567() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler567(), TODO: MISSING ANSWER, 'euler567() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Tom has built a random generator that is connected to a row of $n$ light bulbs. Whenever the random generator is activated each of the $n$ lights is turned on with the probability of $\\frac 1 2$, independently of its former state or the state of the other light bulbs.", - "", - "While discussing with his friend Jerry how to use his generator, they invent two different games, they call the reciprocal games:", - "Both games consist of $n$ turns. Each turn is started by choosing a number $k$ randomly between (and including) $1$ and $n$, with equal probability of $\\frac 1 n$ for each number, while the possible win for that turn is the reciprocal of $k$, that is $\\frac 1 k$.", - "", - "In game A, Tom activates his random generator once in each turn. If the number of lights turned on is the same as the previously chosen number $k$, Jerry wins and gets $\\frac 1 k$, otherwise he will receive nothing for that turn. Jerry's expected win after playing the total game A consisting of $n$ turns is called $J_A(n)$. For example $J_A(6)=0.39505208$, rounded to 8 decimal places.", - "", - "For each turn in game B, after $k$ has been randomly selected, Tom keeps reactivating his random generator until exactly $k$ lights are turned on. After that Jerry takes over and reactivates the random generator until he, too, has generated a pattern with exactly $k$ lights turned on. If this pattern is identical to Tom's last pattern, Jerry wins and gets $\\frac 1 k$, otherwise he will receive nothing. Jerry's expected win after the total game B consisting of $n$ turns is called $J_B(n)$. For example $J_B(6)=0.43333333$, rounded to 8 decimal places.", - "", - "Let $\\displaystyle S(m)=\\sum_{n=1}^m (J_A(n)+J_B(n))$. For example $S(6)=7.58932292$, rounded to 8 decimal places.", - "", - "Find S(123456789), rounded to 8 decimal places." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler567() {", - " // Good luck!", - " return true;", - "}", - "", - "euler567();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fefa58d9425c70af4f8a", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 568: Reciprocal games II", - "tests": [ - { - "text": "euler568() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler568(), TODO: MISSING ANSWER, 'euler568() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Tom has built a random generator that is connected to a row of $n$ light bulbs. Whenever the random generator is activated each of the $n$ lights is turned on with the probability of $\\frac 1 2$, independently of its former state or the state of the other light bulbs.", - "", - "While discussing with his friend Jerry how to use his generator, they invent two different games, they call the reciprocal games:", - "Both games consist of $n$ turns. Each turn is started by choosing a number $k$ randomly between (and including) $1$ and $n$, with equal probability of $\\frac 1 n$ for each number, while the possible win for that turn is the reciprocal of $k$, that is $\\frac 1 k$.", - "", - "In game A, Tom activates his random generator once in each turn. If the number of lights turned on is the same as the previously chosen number $k$, Jerry wins and gets $\\frac 1 k$, otherwise he will receive nothing for that turn. Jerry's expected win after playing the total game A consisting of $n$ turns is called $J_A(n)$. For example $J_A(6)=0.39505208$, rounded to 8 decimal places.", - "", - "For each turn in game B, after $k$ has been randomly selected, Tom keeps reactivating his random generator until exactly $k$ lights are turned on. After that Jerry takes over and reactivates the random generator until he, too, has generated a pattern with exactly $k$ lights turned on. If this pattern is identical to Tom's last pattern, Jerry wins and gets $\\frac 1 k$, otherwise he will receive nothing. Jerry's expected win after the total game B consisting of $n$ turns is called $J_B(n)$. For example $J_B(6)=0.43333333$, rounded to 8 decimal places.", - "", - "Let $D(n)=J_B(n)−J_A(n)$. For example, $D(6) = 0.03828125$.", - "", - "Find the 7 most significant digits of $D(123456789)$ after removing all leading zeros.", - "(If, for example, we had asked for the 7 most significant digits of $D(6)$, the answer would have been 3828125.)" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler568() {", - " // Good luck!", - " return true;", - "}", - "", - "euler568();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fefb58d9425c70af4f8b", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 569: Prime Mountain Range", - "tests": [ - { - "text": "euler569() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler569(), TODO: MISSING ANSWER, 'euler569() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A mountain range consists of a line of mountains with slopes of exactly 45°, and heights governed by the prime numbers, pn. The up-slope of the kth mountain is of height p2k−1, and the downslope is p2k. The first few foot-hills of this range are illustrated below.", - "", - "", - "", - "", - "Tenzing sets out to climb each one in turn, starting from the lowest. At the top of each peak, he looks back and counts how many of the previous peaks he can see. In the example above, the eye-line from the third mountain is drawn in red, showing that he can only see the peak of the second mountain from this viewpoint. Similarly, from the 9th mountain, he can see three peaks, those of the 5th, 7th and 8th mountain.", - "", - "Let P(k) be the number of peaks that are visible looking back from the kth mountain. Hence P(3)=1 and P(9)=3.", - "Also $\\displaystyle \\sum_{k=1}^{100} P(k) = 227$.", - "", - "Find $\\displaystyle \\sum_{k=1}^{2500000} P(k)$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler569() {", - " // Good luck!", - " return true;", - "}", - "", - "euler569();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fefc58d9425c70af4f8c", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 570: Snowflakes", - "tests": [ - { - "text": "euler570() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler570(), TODO: MISSING ANSWER, 'euler570() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A snowflake of order n is formed by overlaying an equilateral triangle (rotated by 180 degrees) onto each equilateral triangle of the same size in a snowflake of order n-1. A snowflake of order 1 is a single equilateral triangle.", - "", - "", - "", - " ", - "", - "", - "Some areas of the snowflake are overlaid repeatedly. In the above picture, blue represents the areas that are one layer thick, red two layers thick, yellow three layers thick, and so on. ", - "", - "For an order n snowflake, let A(n) be the number of triangles that are one layer thick, and let B(n) be the number of triangles that are three layers thick. Define G(n) = gcd(A(n), B(n)).", - "", - "E.g. A(3) = 30, B(3) = 6, G(3)=6", - "A(11) = 3027630, B(11) = 19862070, G(11) = 30", - "", - "Further, G(500) = 186 and $\\sum_{n=3}^{500}G(n)=5124$", - "", - "Find $\\displaystyle \\sum_{n=3}^{10^7}G(n)$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler570() {", - " // Good luck!", - " return true;", - "}", - "", - "euler570();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fefd58d9425c70af4f8d", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 571: Super Pandigital Numbers", - "tests": [ - { - "text": "euler571() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler571(), TODO: MISSING ANSWER, 'euler571() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A positive number is pandigital in base b if it contains all digits from 0 to b - 1 at least once when written in base b.", - "", - "A n-super-pandigital number is a number that is simultaneously pandigital in all bases from 2 to n inclusively.", - "For example 978 = 11110100102 = 11000203 = 331024 = 124035 is the smallest 5-super-pandigital number.", - "Similarly, 1093265784 is the smallest 10-super-pandigital number.", - "The sum of the 10 smallest 10-super-pandigital numbers is 20319792309.", - "", - "What is the sum of the 10 smallest 12-super-pandigital numbers?" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler571() {", - " // Good luck!", - " return true;", - "}", - "", - "euler571();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900fefe58d9425c70af4f8e", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 572: Idempotent matrices", - "tests": [ - { - "text": "euler572() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler572(), TODO: MISSING ANSWER, 'euler572() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A matrix $M$ is called idempotent if $M^2 = M$.", - "Let $M$ be a three by three matrix : ", - "$M=\\begin{pmatrix} ", - " a & b & c\\\\ ", - " d & e & f\\\\", - " g &h &i\\\\", - "\\end{pmatrix}$.", - "Let C(n) be the number of idempotent three by three matrices $M$ with integer elements such that", - "$ -n \\le a,b,c,d,e,f,g,h,i \\le n$.", - "", - "C(1)=164 and C(2)=848.", - "", - "", - "Find C(200)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler572() {", - " // Good luck!", - " return true;", - "}", - "", - "euler572();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900feff58d9425c70af4f8f", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 573: Unfair race", - "tests": [ - { - "text": "euler573() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler573(), TODO: MISSING ANSWER, 'euler573() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "$n$ runners in very different training states want to compete in a race. Each one of them is given a different starting number $k$ $(1\\leq k \\leq n)$ according to his (constant) individual racing speed being $v_k=\\frac{k}{n}$.", - "In order to give the slower runners a chance to win the race, $n$ different starting positions are chosen randomly (with uniform distribution) and independently from each other within the racing track of length $1$. After this, the starting position nearest to the goal is assigned to runner $1$, the next nearest starting position to runner $2$ and so on, until finally the starting position furthest away from the goal is assigned to runner $n$. The winner of the race is the runner who reaches the goal first.", - "", - "Interestingly, the expected running time for the winner is $\\frac{1}{2}$, independently of the number of runners. Moreover, while it can be shown that all runners will have the same expected running time of $\\frac{n}{n+1}$, the race is still unfair, since the winning chances may differ significantly for different starting numbers:", - "", - "Let $P_{n,k}$ be the probability for runner $k$ to win a race with $n$ runners and $E_n = \\sum_{k=1}^n k P_{n,k}$ be the expected starting number of the winner in that race. It can be shown that, for example,", - "$P_{3,1}=\\frac{4}{9}$, $P_{3,2}=\\frac{2}{9}$, $P_{3,3}=\\frac{1}{3}$ and $E_3=\\frac{17}{9}$ for a race with $3$ runners. ", - "You are given that $E_4=2.21875$, $E_5=2.5104$ and $E_{10}=3.66021568$.", - "", - "Find $E_{1000000}$ rounded to 4 digits after the decimal point." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler573() {", - " // Good luck!", - " return true;", - "}", - "", - "euler573();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0058d9425c70af4f90", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 574: Verifying Primes", - "tests": [ - { - "text": "euler574() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler574(), TODO: MISSING ANSWER, 'euler574() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let $q$ be a prime and $A \\ge B >0$ be two integers with the following properties:", - " $A$ and $B$ have no prime factor in common, that is $\\text{gcd}(A,B)=1$.", - " The product $AB$ is divisible by every prime less than q.", - "", - "It can be shown that, given these conditions, any sum $A+Beuler575() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler575(), TODO: MISSING ANSWER, 'euler575() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "It was quite an ordinary day when a mysterious alien vessel appeared as if from nowhere. After waiting several hours and receiving no response it is decided to send a team to investigate, of which you are included. Upon entering the vessel you are met by a friendly holographic figure, Katharina, who explains the purpose of the vessel, Eulertopia.", - "", - "She claims that Eulertopia is almost older than time itself. Its mission was to take advantage of a combination of incredible computational power and vast periods of time to discover the answer to life, the universe, and everything. Hence the resident cleaning robot, Leonhard, along with his housekeeping responsibilities, was built with a powerful computational matrix to ponder the meaning of life as he wanders through a massive 1000 by 1000 square grid of rooms. She goes on to explain that the rooms are numbered sequentially from left to right, row by row. So, for example, if Leonhard was wandering around a 5 by 5 grid then the rooms would be numbered in the following way.", - "", - "", - "", - "", - "Many millenia ago Leonhard reported to Katharina to have found the answer and he is willing to share it with any life form who proves to be worthy of such knowledge.", - "", - "Katharina further explains that the designers of Leonhard were given instructions to program him with equal probability of remaining in the same room or travelling to an adjacent room. However, it was not clear to them if this meant (i) an equal probability being split equally between remaining in the room and the number of available routes, or, (ii) an equal probability (50%) of remaining in the same room and then the other 50% was to be split equally between the number of available routes.", - "", - "", - "", - "", - "(i) Probability of remaining related to number of exits", - "(ii) Fixed 50% probability of remaining", - "", - "", - "The records indicate that they decided to flip a coin. Heads would mean that the probability of remaining was dynamically related to the number of exits whereas tails would mean that they program Leonhard with a fixed 50% probability of remaining in a particular room. Unfortunately there is no record of the outcome of the coin, so without further information we would need to assume that there is equal probability of either of the choices being implemented.", - "", - "Katharina suggests it should not be too challenging to determine that the probability of finding him in a square numbered room in a 5 by 5 grid after unfathomable periods of time would be approximately 0.177976190476 [12 d.p.].", - "", - "In order to prove yourself worthy of visiting the great oracle you must calculate the probability of finding him in a square numbered room in the 1000 by 1000 lair in which he has been wandering.", - "(Give your answer rounded to 12 decimal places)" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler575() {", - " // Good luck!", - " return true;", - "}", - "", - "euler575();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0258d9425c70af4f92", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 576: Irrational jumps", - "tests": [ - { - "text": "euler576() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler576(), TODO: MISSING ANSWER, 'euler576() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A bouncing point moves counterclockwise along a circle with circumference $1$ with jumps of constant length $l<1$, until it hits a gap of length $g<1$, that is placed in a distance $d$ counterclockwise from the starting point. The gap does not include the starting point, that is $g+d<1$.", - "", - "Let $S(l,g,d)$ be the sum of the length of all jumps, until the point falls into the gap. It can be shown that $S(l,g,d)$ is finite for any irrational jump size $l$, regardless of the values of $g$ and $d$.", - "Examples: ", - "$S(\\sqrt{\\frac 1 2}, 0.06, 0.7)=0.7071 \\dots$, $S(\\sqrt{\\frac 1 2}, 0.06, 0.3543)=1.4142 \\dots$ and $S(\\sqrt{\\frac 1 2}, 0.06, 0.2427)=16.2634 \\dots$.", - "", - "Let $M(n, g)$ be the maximum of $ \\sum S(\\sqrt{\\frac 1 p}, g, d)$ for all primes $p \\le n$ and any valid value of $d$.", - "Examples:", - "$M(3, 0.06) =29.5425 \\dots$, since $S(\\sqrt{\\frac 1 2}, 0.06, 0.2427)+S(\\sqrt{\\frac 1 3}, 0.06, 0.2427)=29.5425 \\dots$ is the maximal reachable sum for $g=0.06$. ", - "$M(10, 0.01)=266.9010 \\dots$ ", - "", - "Find $M(100, 0.00002)$, rounded to 4 decimal places." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler576() {", - " // Good luck!", - " return true;", - "}", - "", - "euler576();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0358d9425c70af4f93", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 577: Counting hexagons", - "tests": [ - { - "text": "euler577() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler577(), TODO: MISSING ANSWER, 'euler577() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "An equilateral triangle with integer side length $n \\ge 3$ is divided into $n^2$ equilateral triangles with side length 1 as shown in the diagram below.", - "The vertices of these triangles constitute a triangular lattice with $\\frac{(n+1)(n+2)} 2$ lattice points.", - "Let $H(n)$ be the number of all regular hexagons that can be found by connecting 6 of these points. ", - "", - "", - "", - "", - "For example, $H(3)=1$, $H(6)=12$ and $H(20)=966$.", - "", - "Find $\\displaystyle \\sum_{n=3}^{12345} H(n)$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler577() {", - " // Good luck!", - " return true;", - "}", - "", - "euler577();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0458d9425c70af4f94", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 578: Integers with decreasing prime powers", - "tests": [ - { - "text": "euler578() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler578(), TODO: MISSING ANSWER, 'euler578() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Any positive integer can be written as a product of prime powers: p1a1 × p2a2 × ... × pkak,", - "where pi are distinct prime integers, ai > 0 and pi < pj if i < j.", - "", - "A decreasing prime power positive integer is one for which ai ≥ aj if i < j.", - "For example, 1, 2, 15=3×5, 360=23×32×5 and 1000=23×53 are decreasing prime power integers.", - "", - "Let C(n) be the count of decreasing prime power positive integers not exceeding n.", - "C(100) = 94 since all positive integers not exceeding 100 have decreasing prime powers except 18, 50, 54, 75, 90 and 98.", - "You are given C(106) = 922052.", - "", - "Find C(1013)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler578() {", - " // Good luck!", - " return true;", - "}", - "", - "euler578();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0558d9425c70af4f95", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 579: Lattice points in lattice cubes", - "tests": [ - { - "text": "euler579() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler579(), TODO: MISSING ANSWER, 'euler579() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A lattice cube is a cube in which all vertices have integer coordinates. Let C(n) be the number of different lattice cubes in which the coordinates of all vertices range between (and including) 0 and n. Two cubes are hereby considered different if any of their vertices have different coordinates.", - "For example, C(1)=1, C(2)=9, C(4)=100, C(5)=229, C(10)=4469 and C(50)=8154671.", - "", - "Different cubes may contain different numbers of lattice points.", - "", - "For example, the cube with the vertices", - "(0, 0, 0), (3, 0, 0), (0, 3, 0), (0, 0, 3), (0, 3, 3), (3, 0, 3), (3, 3, 0), (3, 3, 3) contains 64 lattice points (56 lattice points on the surface including the 8 vertices and 8 points within the cube). ", - "In contrast, the cube with the vertices", - "(0, 2, 2), (1, 4, 4), (2, 0, 3), (2, 3, 0), (3, 2, 5), (3, 5, 2), (4, 1, 1), (5, 3, 3) contains only 40 lattice points (20 points on the surface and 20 points within the cube), although both cubes have the same side length 3.", - "", - "", - "Let S(n) be the sum of the lattice points contained in the different lattice cubes in which the coordinates of all vertices range between (and including) 0 and n.", - "", - "For example, S(1)=8, S(2)=91, S(4)=1878, S(5)=5832, S(10)=387003 and S(50)=29948928129.", - "", - "Find S(5000) mod 109." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler579() {", - " // Good luck!", - " return true;", - "}", - "", - "euler579();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0658d9425c70af4f96", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 580: Squarefree Hilbert numbers", - "tests": [ - { - "text": "euler580() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler580(), TODO: MISSING ANSWER, 'euler580() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A Hilbert number is any positive integer of the form $4k+1$ for integer $k\\geq 0$. We shall define a squarefree Hilbert number as a Hilbert number which is not divisible by the square of any Hilbert number other than one. For example, $117$ is a squarefree Hilbert number, equaling $9\\times13$. However $6237$ is a Hilbert number that is not squarefree in this sense, as it is divisible by $9^2$. The number $3969$ is also not squarefree, as it is divisible by both $9^2$ and $21^2$. ", - "", - "", - "There are $2327192$ squarefree Hilbert numbers below $10^7$. ", - "How many squarefree Hilbert numbers are there below $10^{16}$?" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler580() {", - " // Good luck!", - " return true;", - "}", - "", - "euler580();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0758d9425c70af4f97", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 581: 47-smooth triangular numbers", - "tests": [ - { - "text": "euler581() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler581(), TODO: MISSING ANSWER, 'euler581() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A number is p-smooth if it has no prime factors larger than p.", - "Let T be the sequence of triangular numbers, ie T(n)=n(n+1)/2.", - "Find the sum of all indices n such that T(n) is 47-smooth." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler581() {", - " // Good luck!", - " return true;", - "}", - "", - "euler581();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0858d9425c70af4f98", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 582: Nearly isosceles 120 degree triangles", - "tests": [ - { - "text": "euler582() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler582(), TODO: MISSING ANSWER, 'euler582() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let a, b and c be the sides of an integer sided triangle with one angle of 120 degrees, a≤b≤c and b-a≤100.", - "Let T(n) be the number of such triangles with c≤n.", - "T(1000)=235 and T(108)=1245.", - "Find T(10100)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler582() {", - " // Good luck!", - " return true;", - "}", - "", - "euler582();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0958d9425c70af4f99", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 583: Heron Envelopes", - "tests": [ - { - "text": "euler583() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler583(), TODO: MISSING ANSWER, 'euler583() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A standard envelope shape is a convex figure consisting of an isosceles triangle (the flap) placed on top of a rectangle. An example of an envelope with integral sides is shown below. Note that to form a sensible envelope, the perpendicular height of the flap (BCD) must be smaller than the height of the rectangle (ABDE). ", - "", - "", - "", - "", - "", - "", - "In the envelope illustrated, not only are all the sides integral, but also all the diagonals (AC, AD, BD, BE and CE) are integral too. Let us call an envelope with these properties a Heron envelope.", - "", - "", - "", - "Let S(p) be the sum of the perimeters of all the Heron envelopes with a perimeter less than or equal to p. ", - "", - "", - "You are given that S(104) = 884680. Find S(107)." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler583() {", - " // Good luck!", - " return true;", - "}", - "", - "euler583();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0a58d9425c70af4f9a", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 584: Birthday Problem Revisited", - "tests": [ - { - "text": "euler584() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler584(), TODO: MISSING ANSWER, 'euler584() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A long long time ago in a galaxy far far away, the Wimwians, inhabitants of planet WimWi, discovered an unmanned drone that had landed on their planet. On examining the drone, they uncovered a device that sought the answer for the so called \"Birthday Problem\". The description of the problem was as follows:", - "", - "If people on your planet were to enter a very large room one by one, what will be the expected number of people in the room when you first find 3 people with Birthdays within 1 day from each other.", - "", - "The description further instructed them to enter the answer into the device and send the drone into space again. Startled by this turn of events, the Wimwians consulted their best mathematicians. Each year on Wimwi has 10 days and the mathematicians assumed equally likely birthdays and ignored leap years (leap years in Wimwi have 11 days), and found 5.78688636 to be the required answer. As such, the Wimwians entered this answer and sent the drone back into space.", - "", - "", - "After traveling light years away, the drone then landed on planet Joka. The same events ensued except this time, the numbers in the device had changed due to some unknown technical issues. The description read:", - "", - "If people on your planet were to enter a very large room one by one, what will be the expected number of people in the room when you first find 3 people with Birthdays within 7 days from each other.", - "", - "With a 100-day year on the planet, the Jokars (inhabitants of Joka) found the answer to be 8.48967364 (rounded to 8 decimal places because the device allowed only 8 places after the decimal point) assuming equally likely birthdays. They too entered the answer into the device and launched the drone into space again.", - "", - "", - "This time the drone landed on planet Earth. As before the numbers in the problem description had changed. It read:", - "", - "If people on your planet were to enter a very large room one by one, what will be the expected number of people in the room when you first find 4 people with Birthdays within 7 days from each other.", - "", - "What would be the answer (rounded to eight places after the decimal point) the people of Earth have to enter into the device for a year with 365 days? Ignore leap years. Also assume that all birthdays are equally likely and independent of each other." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler584() {", - " // Good luck!", - " return true;", - "}", - "", - "euler584();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0b58d9425c70af4f9b", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 585: Nested square roots", - "tests": [ - { - "text": "euler585() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler585(), TODO: MISSING ANSWER, 'euler585() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Consider the term $\\small \\sqrt{x+\\sqrt{y}+\\sqrt{z}}$ that is representing a nested square root. $x$, $y$ and $z$ are positive integers and $y$ and $z$ are not allowed to be perfect squares, so the number below the outer square root is irrational. Still it can be shown that for some combinations of $x$, $y$ and $z$ the given term can be simplified into a sum and/or difference of simple square roots of integers, actually denesting the square roots in the initial expression. ", - "", - "Here are some examples of this denesting:", - "$\\small \\sqrt{3+\\sqrt{2}+\\sqrt{2}}=\\sqrt{2}+\\sqrt{1}=\\sqrt{2}+1$", - "$\\small \\sqrt{8+\\sqrt{15}+\\sqrt{15}}=\\sqrt{5}+\\sqrt{3}$", - "$\\small \\sqrt{20+\\sqrt{96}+\\sqrt{12}}=\\sqrt{9}+\\sqrt{6}+\\sqrt{3}-\\sqrt{2}=3+\\sqrt{6}+\\sqrt{3}-\\sqrt{2}$", - "$\\small \\sqrt{28+\\sqrt{160}+\\sqrt{108}}=\\sqrt{15}+\\sqrt{6}+\\sqrt{5}-\\sqrt{2}$", - "As you can see the integers used in the denested expression may also be perfect squares resulting in further simplification.", - "", - "Let F($n$) be the number of different terms $\\small \\sqrt{x+\\sqrt{y}+\\sqrt{z}}$, that can be denested into the sum and/or difference of a finite number of square roots, given the additional condition that $0euler586() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler586(), TODO: MISSING ANSWER, 'euler586() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The number 209 can be expressed as $a^2 + 3ab + b^2$ in two distinct ways:", - "", - "", - "$ \\qquad 209 = 8^2 + 3\\cdot 8\\cdot 5 + 5^2$ ", - "$ \\qquad 209 = 13^2 + 3\\cdot13\\cdot 1 + 1^2$", - "", - "", - "Let $f(n,r)$ be the number of integers $k$ not exceeding $n$ that can be expressed as $k=a^2 + 3ab + b^2$, with $a\\gt b>0$ integers, in exactly $r$ different ways.", - "", - "", - "You are given that $f(10^5, 4) = 237$ and $f(10^8, 6) = 59517$.", - "", - "", - "Find $f(10^{15}, 40)$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler586() {", - " // Good luck!", - " return true;", - "}", - "", - "euler586();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0d58d9425c70af4f9d", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 587: Concave triangle", - "tests": [ - { - "text": "euler587() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler587(), TODO: MISSING ANSWER, 'euler587() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A square is drawn around a circle as shown in the diagram below on the left.", - "We shall call the blue shaded region the L-section.", - "A line is drawn from the bottom left of the square to the top right as shown in the diagram on the right.", - "We shall call the orange shaded region a concave triangle.", - "", - "", - "", - "", - "It should be clear that the concave triangle occupies exactly half of the L-section.", - "", - "", - "", - "Two circles are placed next to each other horizontally, a rectangle is drawn around both circles, and a line is drawn from the bottom left to the top right as shown in the diagram below.", - "", - "", - "", - "", - "This time the concave triangle occupies approximately 36.46% of the L-section.", - "", - "", - "If n circles are placed next to each other horizontally, a rectangle is drawn around the n circles, and a line is drawn from the bottom left to the top right, then it can be shown that the least value of n for which the concave triangle occupies less than 10% of the L-section is n = 15.", - "", - "", - "What is the least value of n for which the concave triangle occupies less than 0.1% of the L-section?" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler587() {", - " // Good luck!", - " return true;", - "}", - "", - "euler587();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0e58d9425c70af4f9e", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 588: Quintinomial coefficients", - "tests": [ - { - "text": "euler588() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler588(), TODO: MISSING ANSWER, 'euler588() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The coefficients in the expansion of $(x+1)^k$ are called binomial coefficients.", - "Analoguously the coefficients in the expansion of $(x^4+x^3+x^2+x+1)^k$ are called quintinomial coefficients. (quintus= Latin for fifth).", - "", - "", - "Consider the expansion of $(x^4+x^3+x^2+x+1)^3$:", - "$x^{12}+3x^{11}+6x^{10}+10x^9+15x^8+18x^7+19x^6+18x^5+15x^4+10x^3+6x^2+3x+1$", - "As we can see 7 out of the 13 quintinomial coefficients for $k=3$ are odd.", - "", - "", - "Let $Q(k)$ be the number of odd coefficients in the expansion of $(x^4+x^3+x^2+x+1)^k$.", - "So $Q(3)=7$.", - "", - "", - "You are given $Q(10)=17$ and $Q(100)=35$.", - "", - "Find $\\sum_{k=1}^{18}Q(10^k) $." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler588() {", - " // Good luck!", - " return true;", - "}", - "", - "euler588();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff0f58d9425c70af4f9f", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 589: Poohsticks Marathon", - "tests": [ - { - "text": "euler589() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler589(), TODO: MISSING ANSWER, 'euler589() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Christopher Robin and Pooh Bear love the game of Poohsticks so much that they invented a new version which allows them to play for longer before one of them wins and they have to go home for tea. The game starts as normal with both dropping a stick simultaneously on the upstream side of a bridge. But rather than the game ending when one of the sticks emerges on the downstream side, instead they fish their sticks out of the water, and drop them back in again on the upstream side. The game only ends when one of the sticks emerges from under the bridge ahead of the other one having also 'lapped' the other stick - that is, having made one additional journey under the bridge compared to the other stick.", - "", - "", - "On a particular day when playing this game, the time taken for a stick to travel under the bridge varies between a minimum of 30 seconds, and a maximum of 60 seconds. The time taken to fish a stick out of the water and drop it back in again on the other side is 5 seconds. The current under the bridge has the unusual property that the sticks' journey time is always an integral number of seconds, and it is equally likely to emerge at any of the possible times between 30 and 60 seconds (inclusive). It turns out that under these circumstances, the expected time for playing a single game is 1036.15 seconds (rounded to 2 decimal places). This time is measured from the point of dropping the sticks for the first time, to the point where the winning stick emerges from under the bridge having lapped the other.", - "", - "", - "The stream flows at different rates each day, but maintains the property that the journey time in seconds is equally distributed amongst the integers from a minimum, $n$, to a maximum, $m$, inclusive. Let the expected time of play in seconds be $E(m,n)$. Hence $E(60,30)=1036.15...$", - "", - "", - "Let $S(k)=\\sum_{m=2}^k\\sum_{n=1}^{m-1}E(m,n)$.", - "", - "", - "For example $S(5)=7722.82$ rounded to 2 decimal places.", - "", - "", - "Find $S(100)$ and give your answer rounded to 2 decimal places." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler589() {", - " // Good luck!", - " return true;", - "}", - "", - "euler589();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1058d9425c70af4fa0", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 590: Sets with a given Least Common Multiple", - "tests": [ - { - "text": "euler590() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler590(), TODO: MISSING ANSWER, 'euler590() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let H(n) denote the number of sets of positive integers such that the least common multiple of the integers in the set equals n.", - "E.g.:", - "The integers in the following ten sets all have a least common multiple of 6:", - "{2,3}, {1,2,3}, {6}, {1,6}, {2,6} ,{1,2,6}, {3,6}, {1,3,6}, {2,3,6} and {1,2,3,6}.", - "Thus H(6)=10.", - "", - "", - "Let L(n) denote the least common multiple of the numbers 1 through n.", - "E.g. L(6) is the least common multiple of the numbers 1,2,3,4,5,6 and L(6) equals 60.", - "", - "", - "Let HL(n) denote H(L(n)).", - "You are given HL(4)=H(12)=44.", - "", - "", - "Find HL(50000). Give your answer modulo 109." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler590() {", - " // Good luck!", - " return true;", - "}", - "", - "euler590();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1158d9425c70af4fa1", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 591: Best Approximations by Quadratic Integers", - "tests": [ - { - "text": "euler591() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler591(), TODO: MISSING ANSWER, 'euler591() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Given a non-square integer $d$, any real $x$ can be approximated arbitrarily close by quadratic integers $a+b\\sqrt{d}$, where $a,b$ are integers. For example, the following inequalities approximate $\\pi$ with precision $10^{-13}$:", - "$$4375636191520\\sqrt{2}-6188084046055 < \\pi < 721133315582\\sqrt{2}-1019836515172 $$ ", - "We call $BQA_d(x,n)$ the quadratic integer closest to $x$ with the absolute values of $a,b$ not exceeding $n$. We also define the integral part of a quadratic integer as $I_d(a+b\\sqrt{d}) = a$.", - "", - "You are given that:", - "$BQA_2(\\pi,10) = 6 - 2\\sqrt{2}$", - "$BQA_5(\\pi,100)=26\\sqrt{5}-55$", - "$BQA_7(\\pi,10^6)=560323 - 211781\\sqrt{7}$", - "$I_2(BQA_2(\\pi,10^{13}))=-6188084046055$Find the sum of $|I_d(BQA_d(\\pi,10^{13}))|$ for all non-square positive integers less than 100." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler591() {", - " // Good luck!", - " return true;", - "}", - "", - "euler591();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1258d9425c70af4fa2", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 592: Factorial trailing digits 2", - "tests": [ - { - "text": "euler592() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler592(), TODO: MISSING ANSWER, 'euler592() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "For any N, let f(N) be the last twelve hexadecimal digits before the trailing zeroes in N!.", - "", - "For example, the hexadecimal representation of 20! is 21C3677C82B40000,", - "so f(20) is the digit sequence 21C3677C82B4.", - "", - "Find f(20!). Give your answer as twelve hexadecimal digits, using uppercase for the digits A to F." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler592() {", - " // Good luck!", - " return true;", - "}", - "", - "euler592();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1358d9425c70af4fa3", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 593: Fleeting Medians", - "tests": [ - { - "text": "euler593() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler593(), TODO: MISSING ANSWER, 'euler593() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "We define two sequences $S = \\{S(1), S(2), ..., S(n)\\}$ and $S_2 = \\{S_2(1), S_2(2), ..., S_2(n)\\}$:", - "", - "$S(k) = (p_k)^k$ mod $10007$ where $p_k$ is the $k$th prime number.", - "", - "$S_2(k) = S(k) + S(\\lfloor\\frac{k}{10000}\\rfloor + 1)$ where $\\lfloor \\cdot \\rfloor$ denotes the floor function.", - "", - "Then let $M(i, j)$ be the median of elements $S_2(i)$ through $S_2(j)$, inclusive. For example, $M(1, 10) = 2021.5$ and $M(10^2, 10^3) = 4715.0$.", - "", - "Let $F(n, k) = \\sum_{i=1}^{n-k+1} M(i, i + k - 1)$. For example, $F(100, 10) = 463628.5$ and $F(10^5, 10^4) = 675348207.5$.", - "", - "Find $F(10^7, 10^5)$. If the sum is not an integer, use $.5$ to denote a half. Otherwise, use $.0$ instead." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler593() {", - " // Good luck!", - " return true;", - "}", - "", - "euler593();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1458d9425c70af4fa4", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 594: Rhombus Tilings", - "tests": [ - { - "text": "euler594() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler594(), TODO: MISSING ANSWER, 'euler594() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "For a polygon $P$, let $t(P)$ be the number of ways in which $P$ can be tiled using rhombi and squares with edge length 1. Distinct rotations and reflections are counted as separate tilings.", - "", - "", - "For example, if $O$ is a regular octagon with edge length 1, then $t(O) = 8$. As it happens, all these 8 tilings are rotations of one another:", - "", - "", - "", - "", - "Let $O_{a,b}$ be the equal-angled convex octagon whose edges alternate in length between $a$ and $b$.", - "", - "For example, here is $O_{2,1}$, with one of its tilings:", - "", - "", - "", - "", - "", - "You are given that $t(O_{1,1})=8$, $t(O_{2,1})=76$ and $t(O_{3,2})=456572$.", - "", - "", - "Find $t(O_{4,2})$." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler594() {", - " // Good luck!", - " return true;", - "}", - "", - "euler594();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1558d9425c70af4fa5", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 595: Incremental Random Sort", - "tests": [ - { - "text": "euler595() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler595(), TODO: MISSING ANSWER, 'euler595() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "A deck of cards numbered from 1 to n is shuffled randomly such that each permutation is equally likely.", - "", - "", - "The cards are to be sorted into ascending order using the following technique:", - " Look at the initial sequence of cards. If it is already sorted, then there is no need for further action. Otherwise, if any subsequences of cards happen to be in the correct place relative to one another (ascending with no gaps), then those subsequences are fixed by attaching the cards together. For example, with 7 cards initially in the order 4123756, the cards labelled 1, 2 and 3 would be attached together, as would 5 and 6.", - " The cards are 'shuffled' by being thrown into the air, but note that any correctly sequenced cards remain attached, so their orders are maintained. The cards (or bundles of attached cards) are then picked up randomly. You should assume that this randomisation is unbiased, despite the fact that some cards are single, and others are grouped together. ", - " Repeat steps 1 and 2 until the cards are sorted. ", - "", - " Let S(n) be the expected number of shuffles needed to sort the cards. Since the order is checked before the first shuffle, S(1) = 0. You are given that S(2) = 1, and S(5) = 4213/871.", - "", - "", - "Find S(52), and give your answer rounded to 8 decimal places." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler595() {", - " // Good luck!", - " return true;", - "}", - "", - "euler595();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1658d9425c70af4fa6", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 596: Number of lattice points in a hyperball", - "tests": [ - { - "text": "euler596() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler596(), TODO: MISSING ANSWER, 'euler596() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let T(r) be the number of integer quadruplets x, y, z, t such that x2 + y2 + z2 + t2 ≤ r2. In other words, T(r) is the number of lattice points in the four-dimensional hyperball of radius r.", - "", - "You are given that T(2) = 89, T(5) = 3121, T(100) = 493490641 and T(104) = 49348022079085897.", - "", - "Find T(108) mod 1000000007." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler596() {", - " // Good luck!", - " return true;", - "}", - "", - "euler596();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1758d9425c70af4fa7", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 597: Torpids", - "tests": [ - { - "text": "euler597() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler597(), TODO: MISSING ANSWER, 'euler597() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The Torpids are rowing races held annually in Oxford, following some curious rules:", - "", - "", - "A division consists of $n$ boats (typically 13), placed in order based on past performance.", - "", - "All boats within a division start at 40 metre intervals along the river, in order with the highest-placed boat starting furthest upstream.", - "", - "The boats all start rowing simultaneously, upstream, trying to catch the boat in front while avoiding being caught by boats behind.", - "", - "Each boat continues rowing until either it reaches the finish line or it catches up with (\"bumps\") a boat in front.", - "", - "The finish line is a distance $L$ metres (the course length, in reality about 1800 metres) upstream from the starting position of the lowest-placed boat. (Because of the staggered starting positions, higher-placed boats row a slightly shorter course than lower-placed boats.)", - "", - "When a \"bump\" occurs, the \"bumping\" boat takes no further part in the race. The \"bumped\" boat must continue, however, and may even be \"bumped\" again by boats that started two or more places behind it.", - "", - "After the race, boats are assigned new places within the division, based on the bumps that occurred. Specifically, for any boat $A$ that started in a lower place than $B$, then $A$ will be placed higher than $B$ in the new order if and only if one of the following occurred:", - " $A$ bumped $B$ directly ", - " $A$ bumped another boat that went on to bump $B$ ", - " $A$ bumped another boat, that bumped yet another boat, that bumped $B$ ", - " etc NOTE: For the purposes of this problem you may disregard the boats' lengths, and assume that a bump occurs precisely when the two boats draw level. (In reality, a bump is awarded as soon as physical contact is made, which usually occurs when there is much less than a full boat length's overlap.)", - "", - "", - "Suppose that, in a particular race, each boat $B_j$ rows at a steady speed $v_j = -$log$X_j$ metres per second, where the $X_j$ are chosen randomly (with uniform distribution) between 0 and 1, independently from one another. These speeds are relative to the riverbank: you may disregard the flow of the river.", - "", - "", - "Let $p(n,L)$ be the probability that the new order is an even permutation of the starting order, when there are $n$ boats in the division and $L$ is the course length.", - "", - "", - "For example, with $n=3$ and $L=160$, labelling the boats as $A$,$B$,$C$ in starting order with $C$ highest, the different possible outcomes of the race are as follows:", - "", - " Bumps occurring ", - " New order ", - " Permutation ", - " Probability ", - " none ", - " $A$, $B$, $C$ ", - " even ", - " $4/15$ ", - " $B$ bumps $C$ ", - " $A$, $C$, $B$ ", - " odd ", - " $8/45$ ", - " $A$ bumps $B$ ", - " $B$, $A$, $C$ ", - " odd ", - " $1/3$ ", - "     $B$ bumps $C$, then $A$ bumps $C$     ", - " $C$, $A$, $B$ ", - " even ", - " $4/27$ ", - "     $A$ bumps $B$, then $B$ bumps $C$     ", - " $C$, $B$, $A$ ", - " odd ", - " $2/27$ ", - " ", - "Therefore, $p(3,160) = 4/15 + 4/27 = 56/135$.", - "", - "", - "You are also given that $p(4,400)=0.5107843137$, rounded to 10 digits after the decimal point.", - "", - "", - "Find $p(13,1800)$ rounded to 10 digits after the decimal point." - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler597() {", - " // Good luck!", - " return true;", - "}", - "", - "euler597();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1858d9425c70af4fa8", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 598: Split Divisibilities", - "tests": [ - { - "text": "euler598() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler598(), TODO: MISSING ANSWER, 'euler598() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Consider the number 48.", - "There are five pairs of integers $a$ and $b$ ($a \\leq b$) such that $a \\times b=48$: (1,48), (2,24), (3,16), (4,12) and (6,8).", - "It can be seen that both 6 and 8 have 4 divisors.", - "So of those five pairs one consists of two integers with the same number of divisors.", - "", - "In general:", - "Let $C(n)$ be the number of pairs of positive integers $a \\times b=n$, ($a \\leq b$) such that $a$ and $b$ have the same number of divisors; so $C(48)=1$.", - "", - "", - "You are given $C(10!)=3$: (1680, 2160), (1800, 2016) and (1890,1920). ", - "Find $C(100!)$" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler598() {", - " // Good luck!", - " return true;", - "}", - "", - "euler598();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1958d9425c70af4fa9", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 599: Distinct Colourings of a Rubik's Cube", - "tests": [ - { - "text": "euler599() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler599(), TODO: MISSING ANSWER, 'euler599() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "The well-known Rubik's Cube puzzle has many fascinating mathematical properties. The 2×2×2 variant has 8 cubelets with a total of 24 visible faces, each with a coloured sticker. Successively turning faces will rearrange the cubelets, although not all arrangements of cubelets are reachable without dismantling the puzzle.", - "", - "", - "Suppose that we wish to apply new stickers to a 2×2×2 Rubik's cube in a non-standard colouring. Specifically, we have $n$ different colours available (with an unlimited supply of stickers of each colour), and we place one sticker on each of the 24 faces in any arrangement that we please. We are not required to use all the colours, and if desired the same colour may appear in more than one face of a single cubelet.", - "", - "", - "We say that two such colourings $c_1,c_2$ are essentially distinct if a cube coloured according to $c_1$ cannot be made to match a cube coloured according to $c_2$ by performing mechanically possible Rubik's Cube moves.", - "", - "", - "For example, with two colours available, there are 183 essentially distinct colourings.", - "", - "", - "How many essentially distinct colourings are there with 10 different colours available?" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler599() {", - " // Good luck!", - " return true;", - "}", - "", - "euler599();" - ], - "head": "", - "tail": "" - } - } - }, - { - "id": "5900ff1a58d9425c70af4faa", - "challengeType": 5, - "type": "bonfire", - "title": "Problem 600: Integer sided equiangular hexagons", - "tests": [ - { - "text": "euler600() should return TODO: MISSING ANSWER.", - "testString": "assert.strictEqual(euler600(), TODO: MISSING ANSWER, 'euler600() should return TODO: MISSING ANSWER.');" - } - ], - "solutions": [], - "translations": {}, - "description": [ - "Let H(n) be the number of distinct integer sided equiangular convex hexagons with perimeter not exceeding n.", - "Hexagons are distinct if and only if they are not congruent.", - "", - "You are given H(6) = 1, H(12) = 10, H(100) = 31248.", - "Find H(55106).", - "", - "", - "Equiangular hexagons with perimeter not exceeding 12" - ], - "files": { - "indexjs": { - "key": "indexjs", - "ext": "js", - "name": "index", - "contents": [ - "function euler600() {", - " // Good luck!", - " return true;", - "}", - "", - "euler600();" - ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } } - ], - "fileName": "08-coding-interview-questions-and-take-home-assignments/project-euler-problems.json", - "superBlock": "coding-interview-questions-and-take-home-assignments", - "superOrder": 8 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/08-coding-interview-prep/rosetta-code.json b/packages/learn/seed/challenges/08-coding-interview-prep/rosetta-code.json index 048da52937..e29dbae21e 100644 --- a/packages/learn/seed/challenges/08-coding-interview-prep/rosetta-code.json +++ b/packages/learn/seed/challenges/08-coding-interview-prep/rosetta-code.json @@ -42,8 +42,10 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const solution = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100];" + "head": [], + "tail": [ + "const solution = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100];" + ] } } }, @@ -107,8 +109,27 @@ " return true;", "}" ], - "head": "", - "tail": "const testCases = [\n '4878',\n '1234',\n '6789',\n '1127'\n];\n\nconst answers = [\n ['(7-8/8)*4', '4*(7-8/8)', '(4-8+7)*8', '(4+7-8)*8', '(7+4-8)*8', '(7-8+4)*8', '8*(4-8+7)', '8*(4+7-8)', '8*(7+4-8)', '8*(7-8+4)'],\n ['1*2*3*4', '1*2*4*3', '1*3*2*4', '1*3*4*2', '1*4*2*3', '1*4*3*2', '2*1*3*4', '2*1*4*3', '2*3*1*4', '2*3*4*1', '2*4*3*1', '2*4*1*3', '3*1*2*4', '3*1*4*2', '3*2*1*4', '3*2*4*1', '3*4*1*2', '3*4*2*1', '4*1*2*3', '4*1*3*2', '4*2*1*3', '4*2*3*1', '4*3*1*2', '4*3*2*1', '(1+2+3)*4', '(1+3+2)*4', '(2+1+3)*4', '(2+3+1)*4', '(3+1+2)*4', '(3+2+1)*4', '4*(1+2+3)', '4*(2+1+3)', '4*(2+3+1)', '4*(3+1+2)', '4*(3+2+1)'],\n ['(6*8)/(9-7)', '(8*6)/(9-7)', '6*8/(9-7)', '8*6/(9-7)'],\n ['(1+7)*(2+1)', '(1+7)*(1+2)', '(1+2)*(1+7)', '(1+2)*(7+1)', '(2+1)*(1+7)', '(7+1)*(2+1)']\n];\n\nfunction include(ansArr, res) {\n const index = ansArr.indexOf(res);\n return index >= 0;\n}" + "head": [], + "tail": [ + "const testCases = [", + " '4878',", + " '1234',", + " '6789',", + " '1127'", + "];", + "", + "const answers = [", + " ['(7-8/8)*4', '4*(7-8/8)', '(4-8+7)*8', '(4+7-8)*8', '(7+4-8)*8', '(7-8+4)*8', '8*(4-8+7)', '8*(4+7-8)', '8*(7+4-8)', '8*(7-8+4)'],", + " ['1*2*3*4', '1*2*4*3', '1*3*2*4', '1*3*4*2', '1*4*2*3', '1*4*3*2', '2*1*3*4', '2*1*4*3', '2*3*1*4', '2*3*4*1', '2*4*3*1', '2*4*1*3', '3*1*2*4', '3*1*4*2', '3*2*1*4', '3*2*4*1', '3*4*1*2', '3*4*2*1', '4*1*2*3', '4*1*3*2', '4*2*1*3', '4*2*3*1', '4*3*1*2', '4*3*2*1', '(1+2+3)*4', '(1+3+2)*4', '(2+1+3)*4', '(2+3+1)*4', '(3+1+2)*4', '(3+2+1)*4', '4*(1+2+3)', '4*(2+1+3)', '4*(2+3+1)', '4*(3+1+2)', '4*(3+2+1)'],", + " ['(6*8)/(9-7)', '(8*6)/(9-7)', '6*8/(9-7)', '8*6/(9-7)'],", + " ['(1+7)*(2+1)', '(1+7)*(1+2)', '(1+2)*(1+7)', '(1+2)*(7+1)', '(2+1)*(1+7)', '(7+1)*(2+1)']", + "];", + "", + "function include(ansArr, res) {", + " const index = ansArr.indexOf(res);", + " return index >= 0;", + "}" + ] } } }, @@ -185,8 +206,8 @@ " return true;", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -270,8 +291,10 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const words = ['bark', 'BooK', 'TReAT', 'COMMON', 'squAD', 'conFUSE'];" + "head": [], + "tail": [ + "const words = ['bark', 'BooK', 'TReAT', 'COMMON', 'squAD', 'conFUSE'];" + ] } } }, @@ -323,8 +346,10 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const solution = [15043, 4, 4953];" + "head": [], + "tail": [ + "const solution = [15043, 4, 4953];" + ] } } }, @@ -372,8 +397,14 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const testFn = typeof accumulator(3) === 'function' && accumulator(3);\nif (testFn) {\n testFn(-4);\n testFn(1.5);\n}" + "head": [], + "tail": [ + "const testFn = typeof accumulator(3) === 'function' && accumulator(3);", + "if (testFn) {", + " testFn(-4);", + " testFn(1.5);", + "}" + ] } } }, @@ -429,8 +460,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -507,8 +538,54 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const testInput = [\n 'Given$a$text$file$of$many$lines',\n 'where$fields$within$a$line$',\n 'are$delineated$by$a$single$\"dollar\"$character',\n 'write$a$program',\n 'that$aligns$each$column$of$fields$',\n 'by$ensuring$that$words$in$each$',\n 'column$are$separated$by$at$least$one$space.',\n 'Further,$allow$for$each$word$in$a$column$to$be$either$left$',\n 'justified,$right$justified',\n 'or$center$justified$within$its$column.'\n];\n\nconst rightAligned = ` Given a text file of many lines\n where fields within a line \n are delineated by a single \"dollar\" character\n write a program\n that aligns each column of fields \n by ensuring that words in each \n column are separated by at least one space.\n Further, allow for each word in a column to be either left \njustified, right justified\n or center justified within its column.`;\n\nconst leftAligned = `Given a text file of many lines \nwhere fields within a line \nare delineated by a single \"dollar\" character\nwrite a program \nthat aligns each column of fields \nby ensuring that words in each \ncolumn are separated by at least one space.\nFurther, allow for each word in a column to be either left \njustified, right justified\nor center justified within its column. `;\n\nconst centerAligned = ` Given a text file of many lines \n where fields within a line \n are delineated by a single \"dollar\" character\n write a program \n that aligns each column of fields \n by ensuring that words in each \n column are separated by at least one space.\n Further, allow for each word in a column to be either left \njustified, right justified\n or center justified within its column. `;" + "head": [], + "tail": [ + "const testInput = [", + " 'Given$a$text$file$of$many$lines',", + " 'where$fields$within$a$line$',", + " 'are$delineated$by$a$single$\"dollar\"$character',", + " 'write$a$program',", + " 'that$aligns$each$column$of$fields$',", + " 'by$ensuring$that$words$in$each$',", + " 'column$are$separated$by$at$least$one$space.',", + " 'Further,$allow$for$each$word$in$a$column$to$be$either$left$',", + " 'justified,$right$justified',", + " 'or$center$justified$within$its$column.'", + "];", + "", + "const rightAligned = ` Given a text file of many lines", + " where fields within a line ", + " are delineated by a single \"dollar\" character", + " write a program", + " that aligns each column of fields ", + " by ensuring that words in each ", + " column are separated by at least one space.", + " Further, allow for each word in a column to be either left ", + "justified, right justified", + " or center justified within its column.`;", + "", + "const leftAligned = `Given a text file of many lines ", + "where fields within a line ", + "are delineated by a single \"dollar\" character", + "write a program ", + "that aligns each column of fields ", + "by ensuring that words in each ", + "column are separated by at least one space.", + "Further, allow for each word in a column to be either left ", + "justified, right justified", + "or center justified within its column. `;", + "", + "const centerAligned = ` Given a text file of many lines ", + " where fields within a line ", + " are delineated by a single \"dollar\" character", + " write a program ", + " that aligns each column of fields ", + " by ensuring that words in each ", + " column are separated by at least one space.", + " Further, allow for each word in a column to be either left ", + "justified, right justified", + " or center justified within its column. `;" + ] } } }, @@ -563,8 +640,25 @@ " return true;", "}" ], - "head": "", - "tail": "const answer300 = [[220, 284]];\nconst answer3000 = [\n [220, 284],\n [1184, 1210],\n [2620, 2924]\n];\nconst answer20000 = [\n [220, 284],\n [1184, 1210],\n [2620, 2924],\n [5020, 5564],\n [6232, 6368],\n [10744, 10856],\n [12285, 14595],\n [17296, 18416]\n];" + "head": [], + "tail": [ + "const answer300 = [[220, 284]];", + "const answer3000 = [", + " [220, 284],", + " [1184, 1210],", + " [2620, 2924]", + "];", + "const answer20000 = [", + " [220, 284],", + " [1184, 1210],", + " [2620, 2924],", + " [5020, 5564],", + " [6232, 6368],", + " [10744, 10856],", + " [12285, 14595],", + " [17296, 18416]", + "];" + ] } } }, @@ -605,8 +699,11 @@ " return true;", "}" ], - "head": "", - "tail": "const arr1 = [1, 3, 6, 6, 6, 6, 7, 7, 12, 12, 17];\nconst arr2 = [1, 2, 4, 4, 1];" + "head": [], + "tail": [ + "const arr1 = [1, 3, 6, 6, 6, 6, 7, 7, 12, 12, 17];", + "const arr2 = [1, 2, 4, 4, 1];" + ] } } }, @@ -654,8 +751,19 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const range1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst answer1 = {\n values: {\n Arithmetic: 5.5,\n Geometric: 4.528728688116765,\n Harmonic: 3.414171521474055\n },\n test: 'is A >= G >= H ? yes'\n};\n" + "head": [], + "tail": [ + "const range1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];", + "const answer1 = {", + " values: {", + " Arithmetic: 5.5,", + " Geometric: 4.528728688116765,", + " Harmonic: 3.414171521474055", + " },", + " test: 'is A >= G >= H ? yes'", + "};", + "" + ] } } }, @@ -693,8 +801,11 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const arr1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst answer1 = 6.2048368229954285;" + "head": [], + "tail": [ + "const arr1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];", + "const answer1 = 6.2048368229954285;" + ] } } }, @@ -736,8 +847,12 @@ " return true;", "}" ], - "head": "", - "tail": "const babbageAns = 99736;\nconst endDigits = 269696;\nconst answer = 25264;" + "head": [], + "tail": [ + "const babbageAns = 99736;", + "const endDigits = 269696;", + "const answer = 25264;" + ] } } }, @@ -850,8 +965,29 @@ " return true;", "}" ], - "head": "", - "tail": "const testCases = [\n '[]',\n ']][[[][][][]][',\n '[][[[[][][[[]]]]]]',\n '][',\n '[[[]]]][[]',\n '][[]',\n '][[][]][[[]]',\n '[[][]]][',\n '[[[]]][[]]]][][[',\n '[]][[]]][[[[][]]',\n '][]][[][',\n '[[]][[][]]',\n '[[]]',\n ']][]][[]][[[',\n '][]][][[',\n '][][',\n '[[]]][][][[]][',\n ''\n];" + "head": [], + "tail": [ + "const testCases = [", + " '[]',", + " ']][[[][][][]][',", + " '[][[[[][][[[]]]]]]',", + " '][',", + " '[[[]]]][[]',", + " '][[]',", + " '][[][]][[[]]',", + " '[[][]]][',", + " '[[[]]][[]]]][][[',", + " '[]][[]]][[[[][]]',", + " '][]][[][',", + " '[[]][[][]]',", + " '[[]]',", + " ']][]][[]][[[',", + " '][]][][[',", + " '][][',", + " '[[]]][][][[]][',", + " ''", + "];" + ] } } }, @@ -925,8 +1061,23 @@ " return true;", "}" ], - "head": "", - "tail": "const testCases = [\n [[0.1234, 0.9876], [0.8765, 0.2345], 2.0],\n [[0.0000, 2.0000], [0.0000, 0.0000], 1.0],\n [[0.1234, 0.9876], [0.1234, 0.9876], 2.0],\n [[0.1234, 0.9876], [0.8765, 0.2345], 0.5],\n [[0.1234, 0.9876], [0.1234, 0.9876], 0.0]\n];\nconst answers = [\n [[1.8631, 1.9742], [-0.8632, -0.7521]],\n [0, 1],\n 'Coincident point. Infinite solutions',\n 'No intersection. Points further apart than circle diameter',\n 'Radius Zero'\n];" + "head": [], + "tail": [ + "const testCases = [", + " [[0.1234, 0.9876], [0.8765, 0.2345], 2.0],", + " [[0.0000, 2.0000], [0.0000, 0.0000], 1.0],", + " [[0.1234, 0.9876], [0.1234, 0.9876], 2.0],", + " [[0.1234, 0.9876], [0.8765, 0.2345], 0.5],", + " [[0.1234, 0.9876], [0.1234, 0.9876], 0.0]", + "];", + "const answers = [", + " [[1.8631, 1.9742], [-0.8632, -0.7521]],", + " [0, 1],", + " 'Coincident point. Infinite solutions',", + " 'No intersection. Points further apart than circle diameter',", + " 'Radius Zero'", + "];" + ] } } }, @@ -1046,8 +1197,110 @@ " return true;", "}" ], - "head": "", - "tail": "const points1 = [\n\tnew Point(0.748501, 4.09624),\n\tnew Point(3.00302, 5.26164),\n\tnew Point(3.61878, 9.52232),\n\tnew Point(7.46911, 4.71611),\n\tnew Point(5.7819, 2.69367),\n\tnew Point(2.34709, 8.74782),\n\tnew Point(2.87169, 5.97774),\n\tnew Point(6.33101, 0.463131),\n\tnew Point(7.46489, 4.6268),\n\tnew Point(1.45428, 0.087596)\n];\n\nconst points2 = [\n new Point(37100, 13118),\n new Point(37134, 1963),\n new Point(37181, 2008),\n new Point(37276, 21611),\n new Point(37307, 9320)\n];\n\nconst answer1 = {\n distance: 0.0894096443343775,\n pair: [\n {\n x: 7.46489,\n y: 4.6268\n },\n {\n x: 7.46911,\n y: 4.71611\n }\n ]\n};\n\nconst answer2 = {\n distance: 65.06919393998976,\n pair: [\n {\n x: 37134,\n y: 1963\n },\n {\n x: 37181,\n y: 2008\n }\n ]\n};\n\nconst benchmarkPoints = [\n new Point(16909, 54699),\n new Point(14773, 61107),\n new Point(95547, 45344),\n new Point(95951, 17573),\n new Point(5824, 41072),\n new Point(8769, 52562),\n new Point(21182, 41881),\n new Point(53226, 45749),\n new Point(68180, 887),\n new Point(29322, 44017),\n new Point(46817, 64975),\n new Point(10501, 483),\n new Point(57094, 60703),\n new Point(23318, 35472),\n new Point(72452, 88070),\n new Point(67775, 28659),\n new Point(19450, 20518),\n new Point(17314, 26927),\n new Point(98088, 11164),\n new Point(25050, 56835),\n new Point(8364, 6892),\n new Point(37868, 18382),\n new Point(23723, 7701),\n new Point(55767, 11569),\n new Point(70721, 66707),\n new Point(31863, 9837),\n new Point(49358, 30795),\n new Point(13041, 39745),\n new Point(59635, 26523),\n new Point(25859, 1292),\n new Point(1551, 53890),\n new Point(70316, 94479),\n new Point(48549, 86338),\n new Point(46413, 92747),\n new Point(27186, 50426),\n new Point(27591, 22655),\n new Point(10905, 46153),\n new Point(40408, 84202),\n new Point(52821, 73520),\n new Point(84865, 77388),\n new Point(99819, 32527),\n new Point(34404, 75657),\n new Point(78457, 96615),\n new Point(42140, 5564),\n new Point(62175, 92342),\n new Point(54958, 67112),\n new Point(4092, 19709),\n new Point(99415, 60298),\n new Point(51090, 52158),\n new Point(48953, 58567)\n];" + "head": [], + "tail": [ + "const points1 = [", + "\tnew Point(0.748501, 4.09624),", + "\tnew Point(3.00302, 5.26164),", + "\tnew Point(3.61878, 9.52232),", + "\tnew Point(7.46911, 4.71611),", + "\tnew Point(5.7819, 2.69367),", + "\tnew Point(2.34709, 8.74782),", + "\tnew Point(2.87169, 5.97774),", + "\tnew Point(6.33101, 0.463131),", + "\tnew Point(7.46489, 4.6268),", + "\tnew Point(1.45428, 0.087596)", + "];", + "", + "const points2 = [", + " new Point(37100, 13118),", + " new Point(37134, 1963),", + " new Point(37181, 2008),", + " new Point(37276, 21611),", + " new Point(37307, 9320)", + "];", + "", + "const answer1 = {", + " distance: 0.0894096443343775,", + " pair: [", + " {", + " x: 7.46489,", + " y: 4.6268", + " },", + " {", + " x: 7.46911,", + " y: 4.71611", + " }", + " ]", + "};", + "", + "const answer2 = {", + " distance: 65.06919393998976,", + " pair: [", + " {", + " x: 37134,", + " y: 1963", + " },", + " {", + " x: 37181,", + " y: 2008", + " }", + " ]", + "};", + "", + "const benchmarkPoints = [", + " new Point(16909, 54699),", + " new Point(14773, 61107),", + " new Point(95547, 45344),", + " new Point(95951, 17573),", + " new Point(5824, 41072),", + " new Point(8769, 52562),", + " new Point(21182, 41881),", + " new Point(53226, 45749),", + " new Point(68180, 887),", + " new Point(29322, 44017),", + " new Point(46817, 64975),", + " new Point(10501, 483),", + " new Point(57094, 60703),", + " new Point(23318, 35472),", + " new Point(72452, 88070),", + " new Point(67775, 28659),", + " new Point(19450, 20518),", + " new Point(17314, 26927),", + " new Point(98088, 11164),", + " new Point(25050, 56835),", + " new Point(8364, 6892),", + " new Point(37868, 18382),", + " new Point(23723, 7701),", + " new Point(55767, 11569),", + " new Point(70721, 66707),", + " new Point(31863, 9837),", + " new Point(49358, 30795),", + " new Point(13041, 39745),", + " new Point(59635, 26523),", + " new Point(25859, 1292),", + " new Point(1551, 53890),", + " new Point(70316, 94479),", + " new Point(48549, 86338),", + " new Point(46413, 92747),", + " new Point(27186, 50426),", + " new Point(27591, 22655),", + " new Point(10905, 46153),", + " new Point(40408, 84202),", + " new Point(52821, 73520),", + " new Point(84865, 77388),", + " new Point(99819, 32527),", + " new Point(34404, 75657),", + " new Point(78457, 96615),", + " new Point(42140, 5564),", + " new Point(62175, 92342),", + " new Point(54958, 67112),", + " new Point(4092, 19709),", + " new Point(99415, 60298),", + " new Point(51090, 52158),", + " new Point(48953, 58567)", + "];" + ] } } }, @@ -1103,8 +1356,14 @@ " return true;", "}" ], - "head": "", - "tail": "const testInput1 = [3, 5];\nconst testOutput1 = [[0, 1, 2], [0, 1, 3], [0, 1, 4], [0, 2, 3], [0, 2, 4], [0, 3, 4], [1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]];\n\nconst testInput2 = [4, 6];\nconst testOutput2 = [[0, 1, 2, 3], [0, 1, 2, 4], [0, 1, 2, 5], [0, 1, 3, 4], [0, 1, 3, 5], [0, 1, 4, 5], [0, 2, 3, 4], [0, 2, 3, 5], [0, 2, 4, 5], [0, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 4, 5], [1, 3, 4, 5], [2, 3, 4, 5]];" + "head": [], + "tail": [ + "const testInput1 = [3, 5];", + "const testOutput1 = [[0, 1, 2], [0, 1, 3], [0, 1, 4], [0, 2, 3], [0, 2, 4], [0, 3, 4], [1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]];", + "", + "const testInput2 = [4, 6];", + "const testOutput2 = [[0, 1, 2, 3], [0, 1, 2, 4], [0, 1, 2, 5], [0, 1, 3, 4], [0, 1, 3, 5], [0, 1, 4, 5], [0, 2, 3, 4], [0, 2, 3, 5], [0, 2, 4, 5], [0, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 4, 5], [1, 3, 4, 5], [2, 3, 4, 5]];" + ] } } }, @@ -1168,8 +1427,11 @@ " return true;", "}" ], - "head": "", - "tail": "const testCases = [[], [\"ABC\"], [\"ABC\", \"DEF\"], [\"ABC\", \"DEF\", \"G\", \"H\"]];\nconst results = [\"{}\", \"{ABC}\", \"{ABC and DEF}\", \"{ABC,DEF,G and H}\"];" + "head": [], + "tail": [ + "const testCases = [[], [\"ABC\"], [\"ABC\", \"DEF\"], [\"ABC\", \"DEF\", \"G\", \"H\"]];", + "const results = [\"{}\", \"{ABC}\", \"{ABC and DEF}\", \"{ABC,DEF,G and H}\"];" + ] } } }, @@ -1252,8 +1514,10 @@ " return true;", "}" ], - "head": "", - "tail": "const testCases = [['AA', 'AA', 'AA', 'AA'], ['AA', 'ACB', 'BB', 'CC'], [], ['AA'], ['BB', 'AA']];" + "head": [], + "tail": [ + "const testCases = [['AA', 'AA', 'AA', 'AA'], ['AA', 'ACB', 'BB', 'CC'], [], ['AA'], ['BB', 'AA']];" + ] } } }, @@ -1360,8 +1624,11 @@ " return true;", "}" ], - "head": "", - "tail": "const testCases = [7259, 86400, 6000000];\nconst results = ['2 hr, 59 sec', '1 d', '9 wk, 6 d, 10 hr, 40 min'];" + "head": [], + "tail": [ + "const testCases = [7259, 86400, 6000000];", + "const results = ['2 hr, 59 sec', '1 d', '9 wk, 6 d, 10 hr, 40 min'];" + ] } } }, @@ -1411,8 +1678,12 @@ " return true;", "}" ], - "head": "", - "tail": "const testCases = ['the three truths', 'ababababab', 'abaabba*bbaba*bbab'];\nconst searchString = ['th', 'abab', 'a*b'];\nconst results = [3, 2, 2];" + "head": [], + "tail": [ + "const testCases = ['the three truths', 'ababababab', 'abaabba*bbaba*bbab'];", + "const searchString = ['th', 'abab', 'a*b'];", + "const results = [3, 2, 2];" + ] } } }, @@ -1464,8 +1735,8 @@ " return true;", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1524,8 +1795,25 @@ " return true;", "}" ], - "head": "", - "tail": "const matrices = [\n [\n [2, -1, 5, 1],\n [3, 2, 2, -6],\n [1, 3, 3, -1],\n [5, -2, -3, 3]\n ],\n [\n [3, 1, 1],\n [2, 2, 5],\n [1, -3, -4]\n ]\n];\nconst freeTerms = [[-3, -32, -47, 49], [3, -1, 2]];\n\nconst answers = [[2, -12, -4, 1], [1, 1, -1]];" + "head": [], + "tail": [ + "const matrices = [", + " [", + " [2, -1, 5, 1],", + " [3, 2, 2, -6],", + " [1, 3, 3, -1],", + " [5, -2, -3, 3]", + " ],", + " [", + " [3, 1, 1],", + " [2, 2, 5],", + " [1, -3, -4]", + " ]", + "];", + "const freeTerms = [[-3, -32, -47, 49], [3, -1, 2]];", + "", + "const answers = [[2, -12, -4, 1], [1, 1, -1]];" + ] } } }, @@ -1549,14 +1837,14 @@ }, { "text": "Should return an object.", - "testString": "assert(Array.isArray(getDateFormats()), 'Should return an Array.');" + "testString": "assert(typeof getDateFormats() === 'object', 'Should return an object.');" }, { "text": "Should returned an array with 2 elements.", "testString": "assert(getDateFormats().length === 2, 'Should returned an array with 2 elements.');" }, { - "text": "Should return todays date in the correct format. ", + "text": "Should return the correct date in the right format", "testString": "assert.deepEqual(getDateFormats(), dates, equalsMessage);" } ], @@ -1574,8 +1862,20 @@ " return true;", "}" ], - "head": "", - "tail": "const getDateSolution = () => {\n const date = new Date();\n const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n const fmt1 = `${date.getFullYear()}-${(1 + date.getMonth())}-${date.getDate()}`;\n const fmt2 = `${weekdays[date.getDay()]}, ${months[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;\n return [fmt1, fmt2];\n};\n\nconst dates = getDateSolution();\nconst equalsMessage = `getDataFormats() should return [\"${dates[0]}\", \"${dates[1]}\"].`;" + "head": [], + "tail": [ + "const getDateSolution = () => {", + " const date = new Date();", + " const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];", + " const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];", + " const fmt1 = `${date.getFullYear()}-${(1 + date.getMonth())}-${date.getDate()}`;", + " const fmt2 = `${weekdays[date.getDay()]}, ${months[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;", + " return [fmt1, fmt2];", + "};", + "", + "const dates = getDateSolution();", + "const equalsMessage = `message: getDataFormats() should return [\"${dates[0]}\", \"${dates[1]}\"].`;" + ] } } }, @@ -1638,8 +1938,23 @@ " return true;", "}" ], - "head": "", - "tail": "const tests = [\n 'January 17 2017 11:43am EST',\n 'March 7 2009 7:30pm EST',\n 'February 29 2004 9:15pm EST',\n 'February 28 1999 3:15pm EST',\n 'December 31 2020 1:45pm EST'\n];\nconst answers = [\n 'January 17 2017 11:43pm EST',\n 'March 8 2009 7:30am EST',\n 'March 1 2004 9:15am EST',\n 'March 1 1999 3:15am EST',\n 'January 1 2021 1:45am EST'\n];" + "head": [], + "tail": [ + "const tests = [", + " 'January 17 2017 11:43am EST',", + " 'March 7 2009 7:30pm EST',", + " 'February 29 2004 9:15pm EST',", + " 'February 28 1999 3:15pm EST',", + " 'December 31 2020 1:45pm EST'", + "];", + "const answers = [", + " 'January 17 2017 11:43pm EST',", + " 'March 8 2009 7:30am EST',", + " 'March 1 2004 9:15am EST',", + " 'March 1 1999 3:15am EST',", + " 'January 1 2021 1:45am EST'", + "];" + ] } } }, @@ -1686,8 +2001,11 @@ " return true;", "}" ], - "head": "", - "tail": "const firstSolution = [1977, 1983, 1988, 1994, 2005, 2011, 2016];\nconst secondSolution = [2011, 2016, 2022, 2033, 2039, 2044, 2050, 2061, 2067, 2072, 2078, 2089, 2095, 2101, 2107, 2112, 2118];" + "head": [], + "tail": [ + "const firstSolution = [1977, 1983, 1988, 1994, 2005, 2011, 2016];", + "const secondSolution = [2011, 2016, 2022, 2033, 2039, 2044, 2050, 2061, 2067, 2072, 2078, 2089, 2095, 2101, 2107, 2112, 2118];" + ] } } }, @@ -1740,7 +2058,7 @@ "]

      ", "Task:", "

      Write a function to take a deal number and deal cards in the same order as this algorithm.

      ", - "

      The function must return a two dimentional array representing the FreeCell board.

      ", + "

      The function must return a two dimensional array representing the FreeCell board.

      ", "

      Deals can also be checked against FreeCell solutions to 1000000 games.

      ", "

      (Summon a video solution, and it displays the initial deal.)

      " ], @@ -1783,8 +2101,28 @@ " return true;", "}" ], - "head": "", - "tail": "const replaceThis = 3;\nconst game1 = [\n ['JD', '2D', '9H', 'JC', '5D', '7H', '7C', '5H'],\n ['KD', 'KC', '9S', '5S', 'AD', 'QC', 'KH', '3H'],\n ['2S', 'KS', '9D', 'QD', 'JS', 'AS', 'AH', '3C'],\n ['4C', '5C', 'TS', 'QH', '4H', 'AC', '4D', '7S'],\n ['3S', 'TD', '4S', 'TH', '8H', '2C', 'JH', '7D'],\n ['6D', '8S', '8D', 'QS', '6C', '3D', '8C', 'TC'],\n ['6S', '9C', '2H', '6H']\n];\nconst game617 = [\n ['7D', 'AD', '5C', '3S', '5S', '8C', '2D', 'AH'],\n ['TD', '7S', 'QD', 'AC', '6D', '8H', 'AS', 'KH'],\n ['TH', 'QC', '3H', '9D', '6S', '8D', '3D', 'TC'],\n ['KD', '5H', '9S', '3C', '8S', '7H', '4D', 'JS'],\n ['4C', 'QS', '9C', '9H', '7C', '6H', '2C', '2S'],\n ['4S', 'TS', '2H', '5D', 'JC', '6C', 'JH', 'QH'],\n ['JD', 'KS', 'KC', '4H']\n];" + "head": [], + "tail": [ + "const replaceThis = 3;", + "const game1 = [", + " ['JD', '2D', '9H', 'JC', '5D', '7H', '7C', '5H'],", + " ['KD', 'KC', '9S', '5S', 'AD', 'QC', 'KH', '3H'],", + " ['2S', 'KS', '9D', 'QD', 'JS', 'AS', 'AH', '3C'],", + " ['4C', '5C', 'TS', 'QH', '4H', 'AC', '4D', '7S'],", + " ['3S', 'TD', '4S', 'TH', '8H', '2C', 'JH', '7D'],", + " ['6D', '8S', '8D', 'QS', '6C', '3D', '8C', 'TC'],", + " ['6S', '9C', '2H', '6H']", + "];", + "const game617 = [", + " ['7D', 'AD', '5C', '3S', '5S', '8C', '2D', 'AH'],", + " ['TD', '7S', 'QD', 'AC', '6D', '8H', 'AS', 'KH'],", + " ['TH', 'QC', '3H', '9D', '6S', '8D', '3D', 'TC'],", + " ['KD', '5H', '9S', '3C', '8S', '7H', '4D', 'JS'],", + " ['4C', 'QS', '9C', '9H', '7C', '6H', '2C', '2S'],", + " ['4S', 'TS', '2H', '5D', 'JC', '6C', 'JH', 'QH'],", + " ['JD', 'KS', 'KC', '4H']", + "];" + ] } } }, @@ -1841,8 +2179,18 @@ " return true;", "}" ], - "head": "", - "tail": "const obj1 = { test: 'test' };\nconst obj2 = {\n t: 'test',\n a: ['an', 'array']\n};\nconst obj3 = {\n t: 'try',\n o: obj2\n};" + "head": [], + "tail": [ + "const obj1 = { test: 'test' };", + "const obj2 = {", + " t: 'test',", + " a: ['an', 'array']", + "};", + "const obj3 = {", + " t: 'try',", + " o: obj2", + "};" + ] } } }, @@ -1933,8 +2281,8 @@ " return n;", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -1999,8 +2347,28 @@ " return true;", "}" ], - "head": "", - "tail": "const nums = [1, 2, 3, 4, 5, 6, 7];\nconst total = 12;\nconst len = 14;\nconst result = [\n [2, 3, 7],\n [2, 4, 6],\n [2, 6, 4],\n [2, 7, 3],\n [4, 1, 7],\n [4, 2, 6],\n [4, 3, 5],\n [4, 5, 3],\n [4, 6, 2],\n [4, 7, 1],\n [6, 1, 5],\n [6, 2, 4],\n [6, 4, 2],\n [6, 5, 1]\n];" + "head": [], + "tail": [ + "const nums = [1, 2, 3, 4, 5, 6, 7];", + "const total = 12;", + "const len = 14;", + "const result = [", + " [2, 3, 7],", + " [2, 4, 6],", + " [2, 6, 4],", + " [2, 7, 3],", + " [4, 1, 7],", + " [4, 2, 6],", + " [4, 3, 5],", + " [4, 5, 3],", + " [4, 6, 2],", + " [4, 7, 1],", + " [6, 1, 5],", + " [6, 2, 4],", + " [6, 4, 2],", + " [6, 5, 1]", + "];" + ] } } }, @@ -2062,8 +2430,8 @@ " return true;", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2129,8 +2497,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2139,7 +2507,7 @@ "type": "Waypoint", "description": [ "

      An emirp (prime spelled backwards) are primes that when reversed (in their decimal representation) are a different prime.

      ", - "

      Write a function that should be able to : Show the first n eprimes numbers.Show the eprimes numbers in a range.Show the number of eprimes in a range.Show the nth eprimes number.

      The function should have two paramters. The first will recieve n or the range as an array. The second will recieve a boolean, that specifies if the function returns the eprimes as an array or a single number(the number of primes in the range or the nth prime). According to the parameters the function should return an array or a number." + "

      Write a function that should be able to : Show the first n eprimes numbers.Show the eprimes numbers in a range.Show the number of eprimes in a range.Show the nth eprimes number.

      The function should have two parameters. The first will receive n or the range as an array. The second will receive a boolean, that specifies if the function returns the eprimes as an array or a single number(the number of primes in the range or the nth prime). According to the parameters the function should return an array or a number." ], "null": [], "solutions": [ @@ -2180,8 +2548,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2239,8 +2607,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2304,8 +2672,18 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const tests =\n [[-7, 1, 5, 2, -4, 3, 0], // 3, 6\n [2, 4, 6], // empty\n [2, 9, 2], // 1\n [1, -1, 1, -1, 1, -1, 1], // 0,1,2,3,4,5,6\n [1], // 0\n [] // empty\n ];\nconst ans = [[3, 6], [], [1], [0, 1, 2, 3, 4, 5, 6], [0], []];" + "head": [], + "tail": [ + "const tests =", + " [[-7, 1, 5, 2, -4, 3, 0], // 3, 6", + " [2, 4, 6], // empty", + " [2, 9, 2], // 1", + " [1, -1, 1, -1, 1, -1, 1], // 0,1,2,3,4,5,6", + " [1], // 0", + " [] // empty", + " ];", + "const ans = [[3, 6], [], [1], [0, 1, 2, 3, 4, 5, 6], [0], []];" + ] } } }, @@ -2398,8 +2776,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2463,8 +2841,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2517,8 +2895,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2674,8 +3052,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2706,35 +3084,31 @@ "

      | style=\"text-align:center\"| ] || Jump back to the matching [ if the cell under the pointer is nonzero

      ", "

      |}

      ", "

      Any cell size is allowed, EOF (End-O-File) support is optional, as is whether you have bounded or unbounded memory.

      ", - " " + "" ], "solutions": [ - "function brain(prog){\n var output=\"\";\n\tvar code; // formatted code\n var ip = 0; // current instruction within code\n var nest = 0; // current bracket nesting (for Out button)\n var ahead = []; // locations of matching brackets\n\n var data = [0]; // data array (mod by +, -)\n var dp = 0; // index into data (mod by <, >)\n\n var inp = 0; // current input character (fetch with ,)\n var quit = 0;\n\tvar commands = {\n\t'>':function() { if (++dp >= data.length) data[dp]=0 },\n\t'<':function() { if (--dp < 0) quit++ },\n\t'+':function() { ++data[dp] },\n\t'-':function() { --data[dp] },\n\t'[':function() { if (!data[dp]) ip = ahead[ip]; else ++nest },\n\t']':function() { if ( data[dp]) ip = ahead[ip]; else --nest },\n\t',':function() {\n\t\tvar c = document.getElementById(\"input\").value.charCodeAt(inp++);\n\t\tdata[dp] = isNaN(c) ? 0 : c; // EOF: other options are -1 or no change\n\t},\n\t'.':function() {\n \t\toutput+=String.fromCharCode(data[dp]);\n \t\t/*var s = document.getElementById(\"output\").innerHTML)\n \t\t + String.fromCharCode(data[dp]);\n \t\ts = s.replace(/\\n/g,\"
      \").replace(/ /g,\"&nbsp;\");\n \t\tdocument.getElementById(\"output\").innerHTML = s;*/\n \t},\n };\n\n\tlet ar=prog.split('');\n\tvar st = [], back, error = -1;\n\tfor (ip=0; ip+>+++>++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++<<<<<<<<<-]>>>>+.>>>>+..<.<++++++++.>>>+.<<+.<<<<++++.<++.>>>+++++++.>>>.+++.<+++++++.--------.<<<<<+.<+++.---.\";\nlet hello=\"++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.\";\nlet fib=`+\n\n++\n\n+++\n\n++++\n\n+>+>>\n\n>>++++\n\n+++++++\n\n++++++++\n\n+++++++++\n\n++++++++++\n\n++++++>++++\n\n++++++++++++\n\n+++++++++++++\n\n+++<<<<<<[>[>>\n\n>>>>+>+<<<<<<<-\n\n]>>>>>>>[<<<<<<<\n\n+>>>>>>>-]<[>++++\n\n++++++[-<-[>>+>+<<\n\n<-]>>>[<<<+>>>-]+<[\n\n>[-]<[-]]>[<<[>>>+<<\n\n<-]>>[-]]<<]>>>[>>+>+\n\n<<<-]>>>[<<<+>>>-]+<[>\n\n[-]<[-]]>[<<+>>[-]]<<<<\n\n<<<]>>>>>[++++++++++++++\n\n+++++++++++++++++++++++++\n\n+++++++++.[-]]++++++++++<[\n\n->-<]>+++++++++++++++++++++\n\n+++++++++++++++++++++++++++.\n\n[-]<<<<<<<<<<<<[>>>+>+<<<<-]>\n\n>>>[<<<<+>>>>-]<-[>>.>.<<<[-]]\n\n<<[>>+>+<<<-]>>>[<<<+>>>-]<<[<+\n\n>-]>[<+>-]<<<-]`;\n" + "function brain(prog){\n var output=\"\";\n\tvar code; // formatted code\n var ip = 0; // current instruction within code\n var nest = 0; // current bracket nesting (for Out button)\n var ahead = []; // locations of matching brackets\n\n var data = [0]; // data array (mod by +, -)\n var dp = 0; // index into data (mod by <, >)\n\n var inp = 0; // current input character (fetch with ,)\n var quit = 0;\n\tvar commands = {\n\t'>':function() { if (++dp >= data.length) data[dp]=0 },\n\t'<':function() { if (--dp < 0) quit++ },\n\t'+':function() { ++data[dp] },\n\t'-':function() { --data[dp] },\n\t'[':function() { if (!data[dp]) ip = ahead[ip]; else ++nest },\n\t']':function() { if ( data[dp]) ip = ahead[ip]; else --nest },\n\t',':function() {\n\t\tvar c = document.getElementById(\"input\").value.charCodeAt(inp++);\n\t\tdata[dp] = isNaN(c) ? 0 : c; // EOF: other options are -1 or no change\n\t},\n\t'.':function() {\n \t\toutput+=String.fromCharCode(data[dp]);\n \t\t/*var s = document.getElementById(\"output\").innerHTML)\n \t\t + String.fromCharCode(data[dp]);\n \t\ts = s.replace(/\\n/g,\"
      \").replace(/ /g,\"&nbsp;\");\n \t\tdocument.getElementById(\"output\").innerHTML = s;*/\n \t},\n };\n\n\tlet ar=prog.split('');\n\tvar st = [], back, error = -1;\n\tfor (ip=0; ipbrian(\"bye\") should return a string. ", - "testString": "assert(typeof brain(\"bye\") === 'string', 'brian(\"bye\") should return a string. ');" + "text": "brain(bye) should retuen a string", + "testString": "assert(typeof brain(bye) === 'string', 'brain(bye) should return a string');" }, { - "text": "brian(\"hello\") should return a string. ", - "testString": "assert(typeof brain(\"hello\") === 'string', 'brian(\"hello\") should return a string. ');" + "text": "brain(\"++++++[>++++++++++<-]>+++++.\")++++++++++<-]>+++++.\"),\"A\", 'brain(\"++++++[>++++++++++<-]>+++++.\")brian(\"++++++[>++++++++++<-]>+++++.\") should return \"A\". ", - "testString": "assert.equal(brain(\"++++++[>++++++++++<-]>+++++.\"),\"A\", 'brian(\"++++++[>++++++++++<-]>+++++.\") should return \"A\". ');" + "text": "brain(bye) should return Goodbye, World!\\\\r\\\\n", + "testString": "assert.equal(brain(bye), 'Goodbye, World!\\r\\n', 'brain(bye) should return Goodbye, World!\\\\r\\\\n');" }, { - "text": "brain(\"+bye+\") should return Goodbye, World!\\\\r\\\\n", - "testString": "assert.equal(brain(\"+bye+\"),\"Goodbye, World!\\r\\n\",'brain(\"+bye+\") should return Goodbye, World!\\\\r\\\\n');" + "text": "brain(hello) should return Hello World!\\\\n'", + "testString": "assert.equal(brain(hello), \"Hello World!\\n\", 'brain(hello) should return Hello World!\\\\n');" }, { - "text": "brain(\"+hello+\") should return Hello World!\\n", - "testString": "assert.equal(brain(\"+hello+\"),\"Hello World!\\n\",'brain(\"+hello+\") should return Hello World!\\n');" - }, - { - "text": "brain(\"+fib+\") should return 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89", - "testString": "assert.equal(brain(\"+fib+\"),\"1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89\",'brain(\"+fib+\") should return 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89');" + "text": "brain(fib) should return 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89", + "testString": "assert.equal(brain(fib), \"1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89\", 'brain(fib) should return 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89');" } ], "id": "59e0a8df964e4540d5abe599", @@ -2750,8 +3124,12 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [ + "let fib=`+\n\n++\n\n+++\n\n++++\n\n+>+>>\n\n>>++++\n\n+++++++\n\n++++++++\n\n+++++++++\n\n++++++++++\n\n++++++>++++\n\n++++++++++++\n\n+++++++++++++\n\n+++<<<<<<[>[>>\n\n>>>>+>+<<<<<<<-\n\n]>>>>>>>[<<<<<<<\n\n+>>>>>>>-]<[>++++\n\n++++++[-<-[>>+>+<<\n\n<-]>>>[<<<+>>>-]+<[\n\n>[-]<[-]]>[<<[>>>+<<\n\n<-]>>[-]]<<]>>>[>>+>+\n\n<<<-]>>>[<<<+>>>-]+<[>\n\n[-]<[-]]>[<<+>>[-]]<<<<\n\n<<<]>>>>>[++++++++++++++\n\n+++++++++++++++++++++++++\n\n+++++++++.[-]]++++++++++<[\n\n->-<]>+++++++++++++++++++++\n\n+++++++++++++++++++++++++++.\n\n[-]<<<<<<<<<<<<[>>>+>+<<<<-]>\n\n>>>[<<<<+>>>>-]<-[>>.>.<<<[-]]\n\n<<[>>+>+<<<-]>>>[<<<+>>>-]<<[<+\n\n>-]>[<+>-]<<<-]`;", + "let hello='++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.'", + "let bye='++++++++++[>+>+++>++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++<<<<<<<<<-]>>>>+.>>>>+..<.<++++++++.>>>+.<<+.<<<<++++.<++.>>>+++++++.>>>.+++.<+++++++.--------.<<<<<+.<+++.---.';" + ], + "tail": [] } } }, @@ -2759,7 +3137,7 @@ "title": "Extensible prime generator", "type": "Waypoint", "description": [ - "

      Write a generator of prime numbers, in order, that will automatically adjust to accommodate the generation of any reasonably high prime.

      The generator should be able to : Show the first n prime numbers.Show the prime numbers in a range.Show the number of primes in a range.Show the nth prime number.

      The function should have two paramters. The first will recieve n or the range as an array. The second will recieve a boolean, that specifies if the function returns the prime numbers as an array or a single number(the number of primes in the range or the nth prime). According to the parameters the function should return an array." + "

      Write a generator of prime numbers, in order, that will automatically adjust to accommodate the generation of any reasonably high prime.

      The generator should be able to : Show the first n prime numbers.Show the prime numbers in a range.Show the number of primes in a range.Show the nth prime number.

      The function should have two parameters. The first will receive n or the range as an array. The second will receive a boolean, that specifies if the function returns the prime numbers as an array or a single number(the number of primes in the range or the nth prime). According to the parameters the function should return an array." ], "solutions": [ "// noprotect\nfunction primeGenerator(num, showPrimes) {\n let i,\n arr = [];\n\n function isPrime(num) {\n // try primes <= 16\n if (num <= 16) { return (\n num == 2 || num == 3 || num == 5 || num == 7 || num == 11 || num == 13\n ); }\n // cull multiples of 2, 3, 5 or 7\n if (num % 2 == 0 || num % 3 == 0 || num % 5 == 0 || num % 7 == 0)\n { return false; }\n // cull square numbers ending in 1, 3, 7 or 9\n for (let i = 10; i * i <= num; i += 10) {\n if (num % (i + 1) == 0) return false;\n if (num % (i + 3) == 0) return false;\n if (num % (i + 7) == 0) return false;\n if (num % (i + 9) == 0) return false;\n }\n return true;\n }\n\n if (typeof num === 'number') {\n for (i = 0; arr.length < num; i++) if (isPrime(i)) arr.push(i);\n // first x primes\n if (showPrimes) return arr;\n // xth prime\n return arr.pop();\n }\n\n if (Array.isArray(num)) {\n for (i = num[0]; i <= num[1]; i++) if (isPrime(i)) arr.push(i);\n // primes between x .. y\n if (showPrimes) return arr;\n // number of primes between x .. y\n return arr.length;\n }\n}\n" @@ -2799,8 +3177,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2858,8 +3236,10 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const results=[6,120,3628800];" + "head": [], + "tail": [ + "const results=[6,120,3628800];" + ] } } }, @@ -2937,8 +3317,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -2983,8 +3363,10 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const ans=[[1,3,5,9,15,45],[1,53],[1,2,4,8,16,32,64]];" + "head": [], + "tail": [ + "const ans=[[1,3,5,9,15,45],[1,53],[1,2,4,8,16,32,64]];" + ] } } }, @@ -3020,15 +3402,15 @@ }, { "text": "farey(3) should return [\"1/3\",\"1/2\",\"2/3\"]", - "testString": "assert.deepEqual(farey(3),[\"1/3\",\"1/2\",\"2/3\"], 'farey(3) should return [\"1/3\",\"1/2\",\"2/3\"]');" + "testString": "assert.deepEqual(farey(3), [\"1/3\",\"1/2\",\"2/3\"], 'farey(3) should return [\"1/3\",\"1/2\",\"2/3\"]');" }, { "text": "farey(4) should return [\"1/4\",\"1/3\",\"1/2\",\"2/4\",\"2/3\",\"3/4\"]", - "testString": "assert.deepEqual(farey(4),[\"1/4\",\"1/3\",\"1/2\",\"2/4\",\"2/3\",\"3/4\"],'farey(4) should return [\"1/4\",\"1/3\",\"1/2\",\"2/4\",\"2/3\",\"3/4\"]');" + "testString": "assert.deepEqual(farey(4), [\"1/4\",\"1/3\",\"1/2\",\"2/4\",\"2/3\",\"3/4\"], 'farey(4) should return [\"1/4\",\"1/3\",\"1/2\",\"2/4\",\"2/3\",\"3/4\"]');" }, { "text": "farey(5) should return [\"1/5\",\"1/4\",\"1/3\",\"2/5\",\"1/2\",\"2/4\",\"3/5\",\"2/3\",\"3/4\",\"4/5\"]", - "testString": "assert.deepEqual(farey(5),[\"1/5\",\"1/4\",\"1/3\",\"2/5\",\"1/2\",\"2/4\",\"3/5\",\"2/3\",\"3/4\",\"4/5\"],'farey(5) should return [\"1/5\",\"1/4\",\"1/3\",\"2/5\",\"1/2\",\"2/4\",\"3/5\",\"2/3\",\"3/4\",\"4/5\"]');" + "testString": "assert.deepEqual(farey(5), [\"1/5\",\"1/4\",\"1/3\",\"2/5\",\"1/2\",\"2/4\",\"3/5\",\"2/3\",\"3/4\",\"4/5\"], 'farey(5) should return [\"1/5\",\"1/4\",\"1/3\",\"2/5\",\"1/2\",\"2/4\",\"3/5\",\"2/3\",\"3/4\",\"4/5\"]');" } ], "id": "59c3ec9f15068017c96eb8a3", @@ -3044,8 +3426,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3053,7 +3435,7 @@ "title": "Fibonacci n-step number sequences", "type": "Waypoint", "description": [ - "

      Write a function to generate Fibonacci n-step number sequences and Lucas sequences. The first parameter will be n. The second parameter will be the number of elements to be returned. The third paramter will specify whether to output the Fibonacci sequence or the Lucas sequence. If the parameter is \"f\" then return the Fibonacci sequence and if it is \"l\", then return the Lucas sequence. The sequences must be returned as an array. More details are given below :

      These number series are an expansion of the ordinary Fibonacci sequence where:

      ", + "

      Write a function to generate Fibonacci n-step number sequences and Lucas sequences. The first parameter will be n. The second parameter will be the number of elements to be returned. The third parameter will specify whether to output the Fibonacci sequence or the Lucas sequence. If the parameter is \"f\" then return the Fibonacci sequence and if it is \"l\", then return the Lucas sequence. The sequences must be returned as an array. More details are given below :

      These number series are an expansion of the ordinary Fibonacci sequence where:

      ", "For $n = 2$ we have the Fibonacci sequence; with initial values $[1, 1]$ and $F_k^2 = F_{k-1}^2 + F_{k-2}^2$", "For $n = 3$ we have the tribonacci sequence; with initial values $[1, 1, 2]$ and $F_k^3 = F_{k-1}^3 + F_{k-2}^3 + F_{k-3}^3$", "For $n = 4$ we have the tetranacci sequence; with initial values $[1, 1, 2, 4]$ and $F_k^4 = F_{k-1}^4 + F_{k-2}^4 + F_{k-3}^4 + F_{k-4}^4$...", @@ -3133,8 +3515,16 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const ans = [[1,1,2,3,5,8,13,21,34,55],\n[1,1,2,4,7,13,24,44,81,149,274,504,927,1705,3136],\n[1,1,2,4,8,15,29,56,108,208,401,773,1490,2872,5536],\n[ 2, 1, 3, 4, 7, 11, 18, 29, 47, 76],\n[ 2, 1, 3, 6, 10, 19, 35, 64, 118, 217, 399, 734, 1350, 2483, 4567 ],\n[ 2, 1, 3, 6, 12, 22, 43, 83, 160, 308, 594, 1145, 2207, 4254, 8200 ],\n[ 2, 1, 3, 6, 12, 24, 46, 91, 179, 352, 692, 1360, 2674, 5257, 10335 ]];" + "head": [], + "tail": [ + "const ans = [[1,1,2,3,5,8,13,21,34,55],", + "[1,1,2,4,7,13,24,44,81,149,274,504,927,1705,3136],", + "[1,1,2,4,8,15,29,56,108,208,401,773,1490,2872,5536],", + "[ 2, 1, 3, 4, 7, 11, 18, 29, 47, 76],", + "[ 2, 1, 3, 6, 10, 19, 35, 64, 118, 217, 399, 734, 1350, 2483, 4567 ],", + "[ 2, 1, 3, 6, 12, 22, 43, 83, 160, 308, 594, 1145, 2207, 4254, 8200 ],", + "[ 2, 1, 3, 6, 12, 24, 46, 91, 179, 352, 692, 1360, 2674, 5257, 10335 ]];" + ] } } }, @@ -3187,8 +3577,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3231,8 +3621,18 @@ " // Good luck!", "}" ], - "head": "", - "tail": "let ans=[ { N: 1, Length: 1, Entropy: 0, Word: '1' },\n\n { N: 2, Length: 1, Entropy: 0, Word: '0' },\n\n { N: 3, Length: 2, Entropy: 1, Word: '01' },\n\n { N: 4, Length: 3, Entropy: 0.9182958340544896, Word: '010' },\n\n { N: 5, Length: 5, Entropy: 0.9709505944546688, Word: '01001' }];" + "head": [], + "tail": [ + "let ans=[ { N: 1, Length: 1, Entropy: 0, Word: '1' },", + "", + " { N: 2, Length: 1, Entropy: 0, Word: '0' },", + "", + " { N: 3, Length: 2, Entropy: 1, Word: '01' },", + "", + " { N: 4, Length: 3, Entropy: 0.9182958340544896, Word: '010' },", + "", + " { N: 5, Length: 5, Entropy: 0.9709505944546688, Word: '01001' }];" + ] } } }, @@ -3281,8 +3681,10 @@ " return res;", "}" ], - "head": "", - "tail": "const res = [[27, 82, 41, 124, 8, 4, 2, 1], [351, 77031]];" + "head": [], + "tail": [ + "const res = [[27, 82, 41, 124, 8, 4, 2, 1], [351, 77031]];" + ] } } }, @@ -3364,8 +3766,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3410,8 +3812,13 @@ " return res;", "}" ], - "head": "", - "tail": "const res = {\n firstTwenty: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42],\n firstOver1000: 1002\n};" + "head": [], + "tail": [ + "const res = {", + " firstTwenty: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42],", + " firstOver1000: 1002", + "};" + ] } } }, @@ -3471,8 +3878,26 @@ " return true;", "}" ], - "head": "", - "tail": "const testCases = [\n [[1, 2, 3, 4, 5], ['a', 'b', 'c', 'd', 'e']],\n [[1, 2, 3, 4, 5], ['a', 'b', 'c', 'd']],\n [[1, 2, 3], ['a', 'b', 'c', 'd', 'e']],\n [['a', 'b', 'c', 'd', 'e'], [1, 2, 3, 4, 5]],\n [['a', 'b', 'c', 'd', 'e'], [1, 2, 3, 4]],\n [['a', 'b', 'c'], [1, 2, 3, 4, 5]]\n];\n\nconst res = [\n { 1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e' },\n { 1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: undefined },\n { 1: 'a', 2: 'b', 3: 'c' },\n { a: 1, b: 2, c: 3, d: 4, e: 5 },\n { a: 1, b: 2, c: 3, d: 4, e: undefined },\n { a: 1, b: 2, c: 3 }\n];" + "head": [], + "tail": [ + "const testCases = [", + " [[1, 2, 3, 4, 5], ['a', 'b', 'c', 'd', 'e']],", + " [[1, 2, 3, 4, 5], ['a', 'b', 'c', 'd']],", + " [[1, 2, 3], ['a', 'b', 'c', 'd', 'e']],", + " [['a', 'b', 'c', 'd', 'e'], [1, 2, 3, 4, 5]],", + " [['a', 'b', 'c', 'd', 'e'], [1, 2, 3, 4]],", + " [['a', 'b', 'c'], [1, 2, 3, 4, 5]]", + "];", + "", + "const res = [", + " { 1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e' },", + " { 1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: undefined },", + " { 1: 'a', 2: 'b', 3: 'c' },", + " { a: 1, b: 2, c: 3, d: 4, e: 5 },", + " { a: 1, b: 2, c: 3, d: 4, e: undefined },", + " { a: 1, b: 2, c: 3 }", + "];" + ] } } }, @@ -3661,8 +4086,38 @@ " return [];", "}" ], - "head": "", - "tail": "const hash1 = [\n { age: 27, name: 'Jonah' },\n { age: 18, name: 'Alan' },\n { age: 28, name: 'Glory' },\n { age: 18, name: 'Popeye' },\n { age: 28, name: 'Alan' }\n];\n\nconst hash2 = [\n { character: 'Jonah', nemesis: 'Whales' },\n { character: 'Jonah', nemesis: 'Spiders' },\n { character: 'Alan', nemesis: 'Ghosts' },\n { character: 'Alan', nemesis: 'Zombies' },\n { character: 'Glory', nemesis: 'Buffy' },\n { character: 'Bob', nemesis: 'foo' }\n];\n\nconst res = [\n { A_age: 27, A_name: 'Jonah', B_character: 'Jonah', B_nemesis: 'Whales' },\n { A_age: 27, A_name: 'Jonah', B_character: 'Jonah', B_nemesis: 'Spiders' },\n { A_age: 18, A_name: 'Alan', B_character: 'Alan', B_nemesis: 'Ghosts' },\n { A_age: 18, A_name: 'Alan', B_character: 'Alan', B_nemesis: 'Zombies' },\n { A_age: 28, A_name: 'Glory', B_character: 'Glory', B_nemesis: 'Buffy' },\n { A_age: 28, A_name: 'Alan', B_character: 'Alan', B_nemesis: 'Ghosts' },\n { A_age: 28, A_name: 'Alan', B_character: 'Alan', B_nemesis: 'Zombies' }\n];\n\nconst bench1 = [{ name: 'u2v7v', num: 1 }, { name: 'n53c8', num: 10 }, { name: 'oysce', num: 9 }, { name: '0mto2s', num: 1 }, { name: 'vkh5id', num: 4 }, { name: '5od0cf', num: 8 }, { name: 'uuulue', num: 10 }, { name: '3rgsbi', num: 9 }, { name: 'kccv35r', num: 4 }, { name: '80un74', num: 9 }, { name: 'h4pp3', num: 6 }, { name: '51bit', num: 7 }, { name: 'j9ndf', num: 8 }, { name: 'vf3u1', num: 10 }, { name: 'g0bw0om', num: 10 }, { name: 'j031x', num: 7 }, { name: 'ij3asc', num: 9 }, { name: 'byv83y', num: 8 }, { name: 'bjzp4k', num: 4 }, { name: 'f3kbnm', num: 10 }];\nconst bench2 = [{ friend: 'o8b', num: 8 }, { friend: 'ye', num: 2 }, { friend: '32i', num: 5 }, { friend: 'uz', num: 3 }, { friend: 'a5k', num: 4 }, { friend: 'uad', num: 7 }, { friend: '3w5', num: 10 }, { friend: 'vw', num: 10 }, { friend: 'ah', num: 4 }, { friend: 'qv', num: 7 }, { friend: 'ozv', num: 2 }, { friend: '9ri', num: 10 }, { friend: '7nu', num: 4 }, { friend: 'w3', num: 9 }, { friend: 'tgp', num: 8 }, { friend: 'ibs', num: 1 }, { friend: 'ss7', num: 6 }, { friend: 'g44', num: 9 }, { friend: 'tab', num: 9 }, { friend: 'zem', num: 10 }];" + "head": [], + "tail": [ + "const hash1 = [", + " { age: 27, name: 'Jonah' },", + " { age: 18, name: 'Alan' },", + " { age: 28, name: 'Glory' },", + " { age: 18, name: 'Popeye' },", + " { age: 28, name: 'Alan' }", + "];", + "", + "const hash2 = [", + " { character: 'Jonah', nemesis: 'Whales' },", + " { character: 'Jonah', nemesis: 'Spiders' },", + " { character: 'Alan', nemesis: 'Ghosts' },", + " { character: 'Alan', nemesis: 'Zombies' },", + " { character: 'Glory', nemesis: 'Buffy' },", + " { character: 'Bob', nemesis: 'foo' }", + "];", + "", + "const res = [", + " { A_age: 27, A_name: 'Jonah', B_character: 'Jonah', B_nemesis: 'Whales' },", + " { A_age: 27, A_name: 'Jonah', B_character: 'Jonah', B_nemesis: 'Spiders' },", + " { A_age: 18, A_name: 'Alan', B_character: 'Alan', B_nemesis: 'Ghosts' },", + " { A_age: 18, A_name: 'Alan', B_character: 'Alan', B_nemesis: 'Zombies' },", + " { A_age: 28, A_name: 'Glory', B_character: 'Glory', B_nemesis: 'Buffy' },", + " { A_age: 28, A_name: 'Alan', B_character: 'Alan', B_nemesis: 'Ghosts' },", + " { A_age: 28, A_name: 'Alan', B_character: 'Alan', B_nemesis: 'Zombies' }", + "];", + "", + "const bench1 = [{ name: 'u2v7v', num: 1 }, { name: 'n53c8', num: 10 }, { name: 'oysce', num: 9 }, { name: '0mto2s', num: 1 }, { name: 'vkh5id', num: 4 }, { name: '5od0cf', num: 8 }, { name: 'uuulue', num: 10 }, { name: '3rgsbi', num: 9 }, { name: 'kccv35r', num: 4 }, { name: '80un74', num: 9 }, { name: 'h4pp3', num: 6 }, { name: '51bit', num: 7 }, { name: 'j9ndf', num: 8 }, { name: 'vf3u1', num: 10 }, { name: 'g0bw0om', num: 10 }, { name: 'j031x', num: 7 }, { name: 'ij3asc', num: 9 }, { name: 'byv83y', num: 8 }, { name: 'bjzp4k', num: 4 }, { name: 'f3kbnm', num: 10 }];", + "const bench2 = [{ friend: 'o8b', num: 8 }, { friend: 'ye', num: 2 }, { friend: '32i', num: 5 }, { friend: 'uz', num: 3 }, { friend: 'a5k', num: 4 }, { friend: 'uad', num: 7 }, { friend: '3w5', num: 10 }, { friend: 'vw', num: 10 }, { friend: 'ah', num: 4 }, { friend: 'qv', num: 7 }, { friend: 'ozv', num: 2 }, { friend: '9ri', num: 10 }, { friend: '7nu', num: 4 }, { friend: 'w3', num: 9 }, { friend: 'tgp', num: 8 }, { friend: 'ibs', num: 1 }, { friend: 'ss7', num: 6 }, { friend: 'g44', num: 9 }, { friend: 'tab', num: 9 }, { friend: 'zem', num: 10 }];" + ] } } }, @@ -3719,8 +4174,17 @@ " return [];", "}" ], - "head": "", - "tail": "const testCases = [10, 15, 20, 25];\n\nconst res = [\n [[3, 4, 5], [5, 5, 6], [5, 5, 8], [4, 13, 15], [5, 12, 13], [9, 10, 17], [3, 25, 26], [7, 15, 20], [10, 13, 13], [8, 15, 17]],\n [[3, 4, 5], [5, 5, 6], [5, 5, 8], [4, 13, 15], [5, 12, 13], [9, 10, 17], [3, 25, 26], [7, 15, 20], [10, 13, 13], [8, 15, 17], [13, 13, 24], [6, 25, 29], [11, 13, 20], [5, 29, 30], [13, 14, 15]],\n [[3, 4, 5], [5, 5, 6], [5, 5, 8], [4, 13, 15], [5, 12, 13], [9, 10, 17], [3, 25, 26], [7, 15, 20], [10, 13, 13], [8, 15, 17], [13, 13, 24], [6, 25, 29], [11, 13, 20], [5, 29, 30], [13, 14, 15], [10, 17, 21], [7, 24, 25], [8, 29, 35], [12, 17, 25], [4, 51, 53]],\n [[3, 4, 5], [5, 5, 6], [5, 5, 8], [4, 13, 15], [5, 12, 13], [9, 10, 17], [3, 25, 26], [7, 15, 20], [10, 13, 13], [8, 15, 17], [13, 13, 24], [6, 25, 29], [11, 13, 20], [5, 29, 30], [13, 14, 15], [10, 17, 21], [7, 24, 25], [8, 29, 35], [12, 17, 25], [4, 51, 53], [19, 20, 37], [16, 17, 17], [17, 17, 30], [16, 25, 39], [13, 20, 21]]\n];" + "head": [], + "tail": [ + "const testCases = [10, 15, 20, 25];", + "", + "const res = [", + " [[3, 4, 5], [5, 5, 6], [5, 5, 8], [4, 13, 15], [5, 12, 13], [9, 10, 17], [3, 25, 26], [7, 15, 20], [10, 13, 13], [8, 15, 17]],", + " [[3, 4, 5], [5, 5, 6], [5, 5, 8], [4, 13, 15], [5, 12, 13], [9, 10, 17], [3, 25, 26], [7, 15, 20], [10, 13, 13], [8, 15, 17], [13, 13, 24], [6, 25, 29], [11, 13, 20], [5, 29, 30], [13, 14, 15]],", + " [[3, 4, 5], [5, 5, 6], [5, 5, 8], [4, 13, 15], [5, 12, 13], [9, 10, 17], [3, 25, 26], [7, 15, 20], [10, 13, 13], [8, 15, 17], [13, 13, 24], [6, 25, 29], [11, 13, 20], [5, 29, 30], [13, 14, 15], [10, 17, 21], [7, 24, 25], [8, 29, 35], [12, 17, 25], [4, 51, 53]],", + " [[3, 4, 5], [5, 5, 6], [5, 5, 8], [4, 13, 15], [5, 12, 13], [9, 10, 17], [3, 25, 26], [7, 15, 20], [10, 13, 13], [8, 15, 17], [13, 13, 24], [6, 25, 29], [11, 13, 20], [5, 29, 30], [13, 14, 15], [10, 17, 21], [7, 24, 25], [8, 29, 35], [12, 17, 25], [4, 51, 53], [19, 20, 37], [16, 17, 17], [17, 17, 30], [16, 25, 39], [13, 20, 21]]", + "];" + ] } } }, @@ -3812,8 +4276,12 @@ " return n;", "}" ], - "head": "", - "tail": "const ffrParamRes = [[10, 69], [50, 1509], [100, 5764], [1000, 526334]];\nconst ffsParamRes = [[10, 14], [50, 59], [100, 112], [1000, 1041]];\n" + "head": [], + "tail": [ + "const ffrParamRes = [[10, 69], [50, 1509], [100, 5764], [1000, 526334]];", + "const ffsParamRes = [[10, 14], [50, 59], [100, 112], [1000, 1041]];", + "" + ] } } }, @@ -3870,8 +4338,11 @@ " return n;", "}" ], - "head": "", - "tail": "const testCase = [1000, 1500, 2000, 2500];\nconst res = [502, 755, 1005, 1261];" + "head": [], + "tail": [ + "const testCase = [1000, 1500, 2000, 2500];", + "const res = [502, 755, 1005, 1261];" + ] } } }, @@ -3879,7 +4350,6 @@ "title": "Sailors, coconuts and a monkey problem", "type": "Waypoint", "description": [ - " ", "

      ", " Five sailors are shipwrecked on an island and", " collect a large pile of coconuts during the day.", @@ -3904,40 +4374,40 @@ " it is found that the pile of coconuts divides equally amongst the sailors with", " no remainder. (Nothing for the monkey in the morning.)", "

      ", - " ", + "", " The task:", - " ", - " ", + "", + "", " Create a function that returns the", " the minimum possible size", " of the initial pile of coconuts collected during the day for N", " sailors.", - " ", - " ", + "", + "", " Note:", - " ", - " ", + "", + "", " Of course the tale is told in a", " world where the collection of any amount of coconuts in a day and multiple", " divisions of the pile, etc can occur in time fitting the story line, so as", " not to affect the mathematics.", - " ", - " ", - " ", + "", + "", + "", " C.f:", - " ", + "", " ", " Monkeys and Coconuts - Numberphile (Video) Analytical solution.", - " ", - " ", + "", + "", " A002021 Pile of coconuts problem The On-Line", " Encyclopedia of Integer Sequences. (Although some of its references may use", " the alternate form of the tale).", - " ", - " ", - " " + "", + "", + "" ], "solutions": [ "// noprotect\nfunction splitCoconuts(intSailors) {\n let intNuts = intSailors;\n let result = splitCoconutsHelper(intNuts, intSailors);\n while (!result) {\n intNuts += 1;\n result = splitCoconutsHelper(intNuts, intSailors);\n }\n\n return intNuts;\n}\n\nfunction splitCoconutsHelper(intNuts, intSailors, intDepth) {\n const nDepth = intDepth !== undefined ? intDepth : intSailors;\n const portion = Math.floor(intNuts / intSailors);\n const remain = intNuts % intSailors;\n\n if (portion <= 0 || remain !== (nDepth ? 1 : 0)) {\n return null;\n }\n\n if (nDepth) {\n return splitCoconutsHelper(\n intNuts - portion - remain, intSailors, nDepth - 1\n );\n }\n\n return intNuts;\n}\n" @@ -3975,8 +4445,8 @@ " return true;", "}" ], - "head": "", - "tail": "" + "head": [], + "tail": [] } } }, @@ -3985,21 +4455,19 @@ "type": "Waypoint", "null": [], "description": [ - " ", - " ", " Task:", - " ", + "", "

      ", " For each number list of 6-digit ", " SEDOLs,", " calculate and append the checksum digit.", "

      ", - " ", + "", "

      ", " That is, given the input string on the left, your function should return the", " corresponding string on the right:", "

      ", - " ", + "", "
      ",
               "     710889 => 7108899",
               "     B0YBKJ => B0YBKJ7",
      @@ -4013,7 +4481,7 @@
               "     B0YBKT => B0YBKT7",
               "     B00030 => B000300",
               "    
      ", - " ", + "", "

      ", " Check also that each input is correctly formed, especially", " with respect to valid characters allowed in a SEDOL string. Your function", @@ -4043,10 +4511,6 @@ { "text": "sedol('228276') should return '2282765'.\")", "testString": "assert(sedol('228276') === '2282765', \"sedol('228276') should return '2282765'.\");" - }, - { - "text": "Should return the correct answer when pases a random string from a list. ", - "testString": "assert(sedol(inputVal) === expVal, randMsg);" } ], "id": "59d9c6bc214c613ba73ff012", @@ -4063,8 +4527,8 @@ " return true;", "}" ], - "head": "", - "tail": "const input = [\n '710889', 'B0YBKJ', '406566', 'B0YBLH', '228276',\n 'B0YBKL', '557910', 'B0YBKR', '585284', 'B0YBKT',\n 'BOATER', '12345', '123456', '1234567', 'ABBAAC',\n '767642', 'B33FAC', 'H3FH3F', 'C0M3D1', 'GOOGL3',\n 'APPPL3'\n];\n\nconst expected = [\n '7108899', 'B0YBKJ7', '4065663', 'B0YBLH2', '2282765',\n 'B0YBKL9', '5579107', 'B0YBKR5', '5852842', 'B0YBKT7',\n null, null, '1234563', null, null, '7676426',\n null, 'H3FH3F6', 'C0M3D17', null, null\n];\n\nconst inputLen = input.length;\nconst randIndex = Math.floor(Math.random(new Date().getTime()) * inputLen);\nconst inputVal = input[randIndex];\nconst expVal = expected[randIndex];\nconst randMsg = `message: sedol('${inputVal}') should return '${expVal}'.`;" + "head": [], + "tail": [] } } }, @@ -4143,8 +4607,14 @@ " return true;", "}" ], - "head": "", - "tail": "const simpleSExpr = '(data1 data2 data3)';\nconst simpleSolution = ['data1', 'data2', 'data3'];\n\nconst basicSExpr = '((data \"quoted data\" 123 4.5) (data (!@# (4.5) \"(more\" \"data)\")))';\nconst basicSolution = [[\"data\",\"\\\"quoted data\\\"\",123,4.5],[\"data\",[\"!@#\",[4.5],\"\\\"(more\\\"\",\"\\\"data)\\\"\"]]];" + "head": [], + "tail": [ + "const simpleSExpr = '(data1 data2 data3)';", + "const simpleSolution = ['data1', 'data2', 'data3'];", + "", + "const basicSExpr = '((data \"quoted data\" 123 4.5) (data (!@# (4.5) \"(more\" \"data)\")))';", + "const basicSolution = [[\"data\",\"\\\"quoted data\\\"\",123,4.5],[\"data\",[\"!@#\",[4.5],\"\\\"(more\\\"\",\"\\\"data)\\\"\"]]];" + ] } } }, @@ -4214,8 +4684,17 @@ " return true;", "}" ], - "head": "", - "tail": "const res4 = [1729, 4104, 13832, 20683];\nconst res25 = [\n 1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656,\n 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763,\n 373464, 402597\n];\n\nconst res39From20To29 = [314496, 320264, 327763, 373464, 402597, 439101, 443889, 513000, 513856];" + "head": [], + "tail": [ + "const res4 = [1729, 4104, 13832, 20683];", + "const res25 = [", + " 1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656,", + " 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763,", + " 373464, 402597", + "];", + "", + "const res39From20To29 = [314496, 320264, 327763, 373464, 402597, 439101, 443889, 513000, 513856];" + ] } } }, @@ -4266,8 +4745,8 @@ "testString": "assert.deepEqual(tokenize(testStr1, '|', '^'), res1, \"tokenize('one^|uno||three^^^^|four^^^|^cuatro|', '|', '^') should return ['one|uno', '', 'three^^', 'four^|cuatro', '']\");" }, { - "text": "hi', '&', '@') should return ['a&bcd', 'ef', '', '@hi']\");", - "testString": "assert.deepEqual(tokenize(testStr2, '&', '@'), res2, \"tokenize('a@&bcd&ef&&" + "text": "tokenize('a@&bcd&ef&&@@hi', '&', '@') should return ['a&bcd', 'ef', '', '@hi']", + "testString": "assert.deepEqual(tokenize(testStr2, '&', '@'), res2, 'tokenize(\"a@&bcd&ef&&@@hi\", \"&\", \"@\") should return [\"a&bcd\", \"ef\", \"\", \"@hi\"]');" } ], "id": "594faaab4e2a8626833e9c3d", @@ -4283,8 +4762,15 @@ " return true;", "}" ], - "head": "", - "tail": "const testStr1 = 'one^|uno||three^^^^|four^^^|^cuatro|';\nconst res1 = ['one|uno', '', 'three^^', 'four^|cuatro', ''];\n\n// TODO add more tests\nconst testStr2 = 'a@&bcd&ef&&@@hi';\nconst res2 = ['a&bcd', 'ef', '', '@hi'];" + "head": [], + "tail": [ + "const testStr1 = 'one^|uno||three^^^^|four^^^|^cuatro|';", + "const res1 = ['one|uno', '', 'three^^', 'four^|cuatro', ''];", + "", + "// TODO add more tests", + "const testStr2 = 'a@&bcd&ef&&@@hi';", + "const res2 = ['a&bcd', 'ef', '', '@hi'];" + ] } } }, @@ -4332,9 +4818,9 @@ "Note: the above data would be un-orderable if, for example, dw04 is added to the list of dependencies of dw01.", "

      ", "C.f.:", - " ", + "", " Topological sort/Extracted top item.", - " ", + "", "

      There are two popular algorithms for topological sorting:

      ", "

      ", " Kahn's 1962 topological sort, and depth-first search:", @@ -4386,8 +4872,48 @@ " return true;", "}" ], - "head": "", - "tail": "const libsSimple =\n `aaa bbb\n bbb`;\n\nconst libsVHDL =\n `des_system_lib std synopsys std_cell_lib des_system_lib dw02 dw01 ramlib ieee\n dw01 ieee dw01 dware gtech\n dw02 ieee dw02 dware\n dw03 std synopsys dware dw03 dw02 dw01 ieee gtech\n dw04 dw04 ieee dw01 dware gtech\n dw05 dw05 ieee dware\n dw06 dw06 ieee dware\n dw07 ieee dware\n dware ieee dware\n gtech ieee gtech\n ramlib std ieee\n std_cell_lib ieee std_cell_lib\n synopsys`;\n\nconst solutionVHDL = [\n 'ieee', 'std_cell_lib', 'gtech', 'dware', 'dw07', 'dw06',\n 'dw05', 'dw02', 'dw01', 'dw04', 'std', 'ramlib', 'synopsys',\n 'dw03', 'des_system_lib'\n];\n\nconst libsCustom =\n `a b c d\n b c d\n d c\n c base\n base`;\nconst solutionCustom = ['base', 'c', 'd', 'b', 'a'];\n\nconst libsUnorderable =\n `TestLib Base MainLib\n MainLib TestLib\n Base`;\n\nconst solutionUnorderable = ['Base'];" + "head": [], + "tail": [ + "const libsSimple =", + " `aaa bbb", + " bbb`;", + "", + "const libsVHDL =", + " `des_system_lib std synopsys std_cell_lib des_system_lib dw02 dw01 ramlib ieee", + " dw01 ieee dw01 dware gtech", + " dw02 ieee dw02 dware", + " dw03 std synopsys dware dw03 dw02 dw01 ieee gtech", + " dw04 dw04 ieee dw01 dware gtech", + " dw05 dw05 ieee dware", + " dw06 dw06 ieee dware", + " dw07 ieee dware", + " dware ieee dware", + " gtech ieee gtech", + " ramlib std ieee", + " std_cell_lib ieee std_cell_lib", + " synopsys`;", + "", + "const solutionVHDL = [", + " 'ieee', 'std_cell_lib', 'gtech', 'dware', 'dw07', 'dw06',", + " 'dw05', 'dw02', 'dw01', 'dw04', 'std', 'ramlib', 'synopsys',", + " 'dw03', 'des_system_lib'", + "];", + "", + "const libsCustom =", + " `a b c d", + " b c d", + " d c", + " c base", + " base`;", + "const solutionCustom = ['base', 'c', 'd', 'b', 'a'];", + "", + "const libsUnorderable =", + " `TestLib Base MainLib", + " MainLib TestLib", + " Base`;", + "", + "const solutionUnorderable = ['Base'];" + ] } } }, @@ -4431,7 +4957,7 @@ "topRankPerGroup(1, data, 'genre', 'rating')" ], "solutions": [ - "\nconst collectDept = function (arrOfObj, groupName) {\n const collect = arrOfObj.reduce((rtnObj, obj) => {\n if (rtnObj[obj[groupName]] === undefined) {\n rtnObj[obj[groupName]] = [];\n }\n rtnObj[obj[groupName]].push(obj);\n return rtnObj;\n }, {} // initial value to reduce\n );\n\n return Object.keys(collect).sort().map(key => collect[key]);\n};\n\nconst sortRank = function (arrOfRankArrs, rankName) {\n return arrOfRankArrs.map(item => item.sort((a, b) => {\n if (a[rankName] > b[rankName]) { return -1; }\n if (a[rankName] < b[rankName]) { return 1; }\n return 0;\n }));\n};\n\nfunction topRankPerGroup(n, data, groupName, rankName) {\n if (n < 0) { return; }\n return sortRank(collectDept(data, groupName),\n rankName).map(list => list.slice(0, n));\n}\n" + "const collectDept = function (arrOfObj, groupName) {\n const collect = arrOfObj.reduce((rtnObj, obj) => {\n if (rtnObj[obj[groupName]] === undefined) {\n rtnObj[obj[groupName]] = [];\n }\n rtnObj[obj[groupName]].push(obj);\n return rtnObj;\n }, {} // initial value to reduce\n );\n\n return Object.keys(collect).sort().map(key => collect[key]);\n};\n\nconst sortRank = function (arrOfRankArrs, rankName) {\n return arrOfRankArrs.map(item => item.sort((a, b) => {\n if (a[rankName] > b[rankName]) { return -1; }\n if (a[rankName] < b[rankName]) { return 1; }\n return 0;\n }));\n};\n\nfunction topRankPerGroup(n, data, groupName, rankName) {\n if (n < 0) { return; }\n return sortRank(collectDept(data, groupName),\n rankName).map(list => list.slice(0, n));\n}\n" ], "tests": [ { @@ -4477,8 +5003,39 @@ " return true;", "}" ], - "head": "", - "tail": "const testData1 = [\n { name: 'Tyler Bennett', id: 'E10297', salary: 32000, dept: 'D101' },\n { name: 'John Rappl', id: 'E21437', salary: 47000, dept: 'D050' },\n { name: 'George Woltman', id: 'E00127', salary: 53500, dept: 'D101' },\n { name: 'Adam Smith', id: 'E63535', salary: 18000, dept: 'D202' },\n { name: 'Claire Buckman', id: 'E39876', salary: 27800, dept: 'D202' },\n { name: 'David McClellan', id: 'E04242', salary: 41500, dept: 'D101' },\n { name: 'Rich Holcomb', id: 'E01234', salary: 49500, dept: 'D202' },\n { name: 'Nathan Adams', id: 'E41298', salary: 21900, dept: 'D050' },\n { name: 'Richard Potter', id: 'E43128', salary: 15900, dept: 'D101' },\n { name: 'David Motsinger', id: 'E27002', salary: 19250, dept: 'D202' },\n { name: 'Tim Sampair', id: 'E03033', salary: 27000, dept: 'D101' },\n { name: 'Kim Arlich', id: 'E10001', salary: 57000, dept: 'D190' },\n { name: 'Timothy Grove', id: 'E16398', salary: 29900, dept: 'D190' }\n];\n\nconst res1 = topRankPerGroup(10, testData1, 'dept', 'salary');\n\nconst testData2 = [\n { name: 'Friday 13th', genre: 'horror', rating: 9.9 },\n { name: \"Nightmare on Elm's Street\", genre: 'horror', rating: 5.7 },\n { name: 'Titanic', genre: 'drama', rating: 7.3 },\n { name: 'Maze Runner', genre: 'scifi', rating: 7.1 },\n { name: 'Blade runner', genre: 'scifi', rating: 8.9 }\n];\n\nconst res2 = topRankPerGroup(1, testData2, 'genre', 'rating');\nconst res3 = topRankPerGroup(2, testData2, 'genre', 'rating');\n\n//console.log(JSON.stringify(topRankPerGroup(10, testData1)));" + "head": [], + "tail": [ + "const testData1 = [", + " { name: 'Tyler Bennett', id: 'E10297', salary: 32000, dept: 'D101' },", + " { name: 'John Rappl', id: 'E21437', salary: 47000, dept: 'D050' },", + " { name: 'George Woltman', id: 'E00127', salary: 53500, dept: 'D101' },", + " { name: 'Adam Smith', id: 'E63535', salary: 18000, dept: 'D202' },", + " { name: 'Claire Buckman', id: 'E39876', salary: 27800, dept: 'D202' },", + " { name: 'David McClellan', id: 'E04242', salary: 41500, dept: 'D101' },", + " { name: 'Rich Holcomb', id: 'E01234', salary: 49500, dept: 'D202' },", + " { name: 'Nathan Adams', id: 'E41298', salary: 21900, dept: 'D050' },", + " { name: 'Richard Potter', id: 'E43128', salary: 15900, dept: 'D101' },", + " { name: 'David Motsinger', id: 'E27002', salary: 19250, dept: 'D202' },", + " { name: 'Tim Sampair', id: 'E03033', salary: 27000, dept: 'D101' },", + " { name: 'Kim Arlich', id: 'E10001', salary: 57000, dept: 'D190' },", + " { name: 'Timothy Grove', id: 'E16398', salary: 29900, dept: 'D190' }", + "];", + "", + "const res1 = topRankPerGroup(10, testData1, 'dept', 'salary');", + "", + "const testData2 = [", + " { name: 'Friday 13th', genre: 'horror', rating: 9.9 },", + " { name: \"Nightmare on Elm's Street\", genre: 'horror', rating: 5.7 },", + " { name: 'Titanic', genre: 'drama', rating: 7.3 },", + " { name: 'Maze Runner', genre: 'scifi', rating: 7.1 },", + " { name: 'Blade runner', genre: 'scifi', rating: 8.9 }", + "];", + "", + "const res2 = topRankPerGroup(1, testData2, 'genre', 'rating');", + "const res3 = topRankPerGroup(2, testData2, 'genre', 'rating');", + "", + "//console.log(JSON.stringify(topRankPerGroup(10, testData1)));" + ] } } }, @@ -4537,8 +5094,13 @@ " return [[]];", "}" ], - "head": "", - "tail": "const res3 = towerOfHanoi(3, 'A', 'B', 'C');\nconst res3Moves = [['A', 'B'], ['A', 'C'], ['B', 'C'], ['A', 'B'], ['C', 'A'], ['C', 'B'], ['A', 'B']];\nconst res5 = towerOfHanoi(5, 'X', 'Y', 'Z');\nconst res7First10Moves = [['A', 'B'], ['A', 'C'], ['B', 'C'], ['A', 'B'], ['C', 'A'], ['C', 'B'], ['A', 'B'], ['A', 'C'], ['B', 'C'], ['B', 'A']];" + "head": [], + "tail": [ + "const res3 = towerOfHanoi(3, 'A', 'B', 'C');", + "const res3Moves = [['A', 'B'], ['A', 'C'], ['B', 'C'], ['A', 'B'], ['C', 'A'], ['C', 'B'], ['A', 'B']];", + "const res5 = towerOfHanoi(5, 'X', 'Y', 'Z');", + "const res7First10Moves = [['A', 'B'], ['A', 'C'], ['B', 'C'], ['A', 'B'], ['C', 'A'], ['C', 'B'], ['A', 'B'], ['A', 'C'], ['B', 'C'], ['B', 'A']];" + ] } } }, @@ -4549,9 +5111,9 @@ "A vector is defined as having three dimensions as being represented by an ordered collection of three numbers:   (X, Y, Z).", "

      ", "Task:", - " ", + "", " Write a function that takes two vectors (arrays) as input and computes their cross product.", - " ", + "", "Your function should return null on", "invalid inputs (ie vectors of different lengths).", "

      " @@ -4586,8 +5148,13 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const tv1 = [1, 2, 3];\nconst tv2 = [4, 5, 6];\nconst res12 = crossProduct(tv1, tv2);\nconst exp12 = [-3, 6, -3];" + "head": [], + "tail": [ + "const tv1 = [1, 2, 3];", + "const tv2 = [4, 5, 6];", + "const res12 = crossProduct(tv1, tv2);", + "const exp12 = [-3, 6, -3];" + ] } } }, @@ -4600,9 +5167,9 @@ "

      ", "

      ", "Task:", - " ", + "", " Write a function that takes any numbers of vectors (arrays) as input and computes their dot product.", - " ", + "", "Your function should return null on", "invalid inputs (ie vectors of different lengths).", "

      " @@ -4628,12 +5195,12 @@ "testString": "assert.equal(dotProduct([1], [1, 2]), null, 'dotProduct([[1], [1, 2]]) must return null.');" }, { - "text": "dotProduct([[1, 3, -5], [4, -2, -1]]) must return 3.", - "testString": "assert.equal(dotProduct(...vectorsWp), 3, 'dotProduct([[1, 3, -5], [4, -2, -1]]) must return 3.');" + "text": "dotProduct([1, 3, -5], [4, -2, -1]) must return 3.", + "testString": "assert.equal(dotProduct([1, 3, -5], [4, -2, -1]), 3, 'dotProduct([1, 3, -5], [4, -2, -1]) must return 3.');" }, { - "text": "Should return 156000. ", - "testString": "assert.equal(dotProduct(...vectors5x5), 156000, 'Should return 156000. ');" + "text": "dotProduct(...nVectors) should return 156000", + "testString": "assert.equal(dotProduct([ 0, 1, 2, 3, 4 ], [ 0, 2, 4, 6, 8 ], [ 0, 3, 6, 9, 12 ], [ 0, 4, 8, 12, 16 ], [ 0, 5, 10, 15, 20 ]), 156000, 'dotProduct(...nVectors) should return 156000');" } ], "id": "594810f028c0303b75339ad3", @@ -4649,8 +5216,8 @@ " // Good luck!", "}" ], - "head": "", - "tail": "const vectors5x5 = [ [ 0, 1, 2, 3, 4 ], [ 0, 2, 4, 6, 8 ], [ 0, 3, 6, 9, 12 ], [ 0, 4, 8, 12, 16 ], [ 0, 5, 10, 15, 20 ] ];\nconst vectorsWp = [[1, 3, -5], [4, -2, -1]];" + "head": [], + "tail": [] } } }, @@ -4672,9 +5239,9 @@ "", "

      ", "Task:", - " ", + "", " Write a function that can wrap this text to any number of characters.", - " ", + "", "As an example, the text wrapped to 80 characters should look like the following:", "

      ", "
      ",
      @@ -4689,28 +5256,28 @@
             ],
             "tests": [
               {
      -          "text": "wrap must be a function.",
      -          "testString": "assert.equal(typeof wrap, 'function', 'wrap must be a function.');"
      +          "text": "wrap must be a function.",
      +          "testString": "assert.equal(typeof wrap, 'function', 'wrap must be a function.');"
               },
               {
      -          "text": "wrap must return a string.",
      -          "testString": "assert.equal(typeof wrap('abc', 10), 'string', 'wrap must return a string.');"
      +          "text": "wrap must return a string.",
      +          "testString": "assert.equal(typeof wrap('abc', 10), 'string', 'wrap must return a string.');"
               },
               {
                 "text": "wrap(80) must return 4 lines.",
      -          "testString": "assert(wrapped80.split('\\n').length === 4, 'wrap(80) must return 4 lines.');"
      +          "testString": "assert(wrapped80.split('\\n').length === 4, 'wrap(80) must return 4 lines.');"
               },
               {
      -          "text": "wrap(80) should break at the correct point. ",
      -          "testString": "assert.equal(wrapped80.split('\\n')[0], 'wrap(80) should break at the correct point. ');"
      +          "text": "Your wrap function should return our expected text",
      +          "testString": "assert.equal(wrapped80.split('\\n')[0], firstRow80, 'Your wrap function should return our expected text');"
               },
               {
                 "text": "wrap(42) must return 7 lines.",
      -          "testString": "assert(wrapped42.split('\\n').length === 7, 'wrap(42) must return 7 lines.');"
      +          "testString": "assert(wrapped42.split('\\n').length === 7, 'wrap(42) must return 7 lines.');"
               },
               {
      -          "text": "wrap(42) should break at the correct point. ",
      -          "testString": "assert.equal(wrapped42.split('\\n')[0], 'wrap(42) should break at the correct point. ');"
      +          "text": "Your wrap function should return our expected text",
      +          "testString": "assert.equal(wrapped42.split('\\n')[0], firstRow42, 'Your wrap function should return our expected text');"
               }
             ],
             "id": "594810f028c0303b75339ad4",
      @@ -4726,8 +5293,22 @@
                   "  return text;",
                   "}"
                 ],
      -          "head": "",
      -          "tail": "const text =\n`Wrap text using a more sophisticated algorithm such as the Knuth and Plass TeX algorithm.\nIf your language provides this, you get easy extra credit,\nbut you ''must reference documentation'' indicating that the algorithm\nis something better than a simple minimimum length algorithm.`;\n\nconst wrapped80 = wrap(text, 80);\nconst wrapped42 = wrap(text, 42);\n\nconst firstRow80 =\n    'Wrap text using a more sophisticated algorithm such as the Knuth and Plass TeX';\n\nconst firstRow42 = 'Wrap text using a more sophisticated';"
      +          "head": [],
      +          "tail": [
      +            "const text =",
      +            "`Wrap text using a more sophisticated algorithm such as the Knuth and Plass TeX algorithm.",
      +            "If your language provides this, you get easy extra credit,",
      +            "but you ''must reference documentation'' indicating that the algorithm",
      +            "is something better than a simple minimimum length algorithm.`;",
      +            "",
      +            "const wrapped80 = wrap(text, 80);",
      +            "const wrapped42 = wrap(text, 42);",
      +            "",
      +            "const firstRow80 =",
      +            "    'Wrap text using a more sophisticated algorithm such as the Knuth and Plass TeX';",
      +            "",
      +            "const firstRow42 = 'Wrap text using a more sophisticated';"
      +          ]
               }
             }
           },
      @@ -4749,10 +5330,10 @@
               "fixed-point combinators.",
               "

      ", "Task:", - " ", + "", " Define the stateless Y combinator function and use it to compute", " factorial.", - " ", + "", "factorial(N) function is already given to you.", "See also Jim Weirich: Adventures in Functional Programming." ], @@ -4806,8 +5387,10 @@ " };", "});" ], - "head": "", - "tail": "var factorial = Y(f => n => (n > 1 ? n * f(n - 1) : 1));" + "head": [], + "tail": [ + "var factorial = Y(f => n => (n > 1 ? n * f(n - 1) : 1));" + ] } } }, @@ -4847,11 +5430,11 @@ "tests": [ { "text": "zeckendorf must be function", - "testString": "assert.equal(typeof zeckendorf, 'function', 'zeckendorf must be function');" + "testString": "assert.equal(typeof zeckendorf, 'function', 'zeckendorf must be function');" }, { - "text": "Passing a random number from a list to zeckendorf returns the correct zeckendorf number. ", - "testString": "assert.deepEqual(answer, solution20, 'Passing a random number from a list to zeckendorf returns the correct zeckendorf number. ');" + "text": "Your zeckendorf function should return the correct answer", + "testString": "assert.deepEqual(answer, solution20, 'Your zeckendorf function should return the correct answer');" } ], "id": "594810f028c0303b75339ad6", @@ -4867,8 +5450,22 @@ " // good luck!", "}" ], - "head": "", - "tail": "const range = (m, n) => (\n Array.from({\n length: Math.floor(n - m) + 1\n }, (_, i) => m + i)\n);\n\nconst solution20 = [\n '1', '10', '100', '101', '1000', '1001', '1010', '10000', '10001',\n '10010', '10100', '10101', '100000', '100001', '100010', '100100', '100101',\n '101000', '101001', '101010'\n];\n\nconst answer = range(1, 20).map(zeckendorf);" + "head": [], + "tail": [ + "const range = (m, n) => (", + " Array.from({", + " length: Math.floor(n - m) + 1", + " }, (_, i) => m + i)", + ");", + "", + "const solution20 = [", + " '1', '10', '100', '101', '1000', '1001', '1010', '10000', '10001',", + " '10010', '10100', '10101', '100000', '100001', '100010', '100100', '100101',", + " '101000', '101001', '101010'", + "];", + "", + "const answer = range(1, 20).map(zeckendorf);" + ] } } }, @@ -4898,7 +5495,7 @@ "
      ", "It produces the thinned output:", "
      ",
      -        "                                                           ",
      +        "",
               "    # ##########                       #######",
               "     ##        #                   ####       #",
               "     #          #                 ##",
      @@ -4913,7 +5510,7 @@
               "     #                            ##",
               "     #                             ############",
               "                       ###                          ###",
      -        "                                                           ",
      +        "",
               "                                                           
      ", "

      Algorithm

      ", "Assume black pixels are one and white pixels zero, and that the input image is a rectangular N by M array of ones and zeroes.", @@ -4924,12 +5521,12 @@ " P7P6P5", "", "Obviously the boundary pixels of the image cannot have the full eight neighbours.", - " ", + "", " Define $A(P1)$ = the number of transitions from white to black, (0 -> 1) in the sequence P2,P3,P4,P5,P6,P7,P8,P9,P2. (Note the extra P2 at the end - it is circular).", - " ", - " ", + "", + "", " Define $B(P1)$ = the number of black pixel neighbours of P1. ( = sum(P2 .. P9) )", - " ", + "", "

      Step 1:

      ", "All pixels are tested and pixels satisfying all the following conditions (simultaneously) are just noted at this stage.", " (0) The pixel is black and has eight neighbours", @@ -4962,8 +5559,8 @@ "testString": "assert.equal(typeof thinImage, 'function', 'thinImage must be a function');" }, { - "text": "thinImage must return an array of strings", - "testString": "assert.equal(typeof result, 'object', 'thinImage must return an array of strings');" + "text": "thinImage must return an array", + "testString": "assert(Array.isArray(result), 'thinImage must return an array');" }, { "text": "thinImage must return an array of strings", @@ -5007,8 +5604,49 @@ " // Good luck!", "}" ], - "head": "", - "tail": "\nconst imageForTests = [\n ' ',\n ' ################# ############# ',\n ' ################## ################ ',\n ' ################### ################## ',\n ' ######## ####### ################### ',\n ' ###### ####### ####### ###### ',\n ' ###### ####### ####### ',\n ' ################# ####### ',\n ' ################ ####### ',\n ' ################# ####### ',\n ' ###### ####### ####### ',\n ' ###### ####### ####### ',\n ' ###### ####### ####### ###### ',\n ' ######## ####### ################### ',\n ' ######## ####### ###### ################## ###### ',\n ' ######## ####### ###### ################ ###### ',\n ' ######## ####### ###### ############# ###### ',\n ' '];\nconst expected = [\n ' ',\n ' ',\n ' # ########## ####### ',\n ' ## # #### # ',\n ' # # ## ',\n ' # # # ',\n ' # # # ',\n ' # # # ',\n ' ############ # ',\n ' # # # ',\n ' # # # ',\n ' # # # ',\n ' # # # ',\n ' # ## ',\n ' # ############ ',\n ' ### ### ',\n ' ',\n ' '\n];\nconst result = thinImage(imageForTests);" + "head": [], + "tail": [ + "const imageForTests = [", + " ' ',", + " ' ################# ############# ',", + " ' ################## ################ ',", + " ' ################### ################## ',", + " ' ######## ####### ################### ',", + " ' ###### ####### ####### ###### ',", + " ' ###### ####### ####### ',", + " ' ################# ####### ',", + " ' ################ ####### ',", + " ' ################# ####### ',", + " ' ###### ####### ####### ',", + " ' ###### ####### ####### ',", + " ' ###### ####### ####### ###### ',", + " ' ######## ####### ################### ',", + " ' ######## ####### ###### ################## ###### ',", + " ' ######## ####### ###### ################ ###### ',", + " ' ######## ####### ###### ############# ###### ',", + " ' '];", + "const expected = [", + " ' ',", + " ' ',", + " ' # ########## ####### ',", + " ' ## # #### # ',", + " ' # # ## ',", + " ' # # # ',", + " ' # # # ',", + " ' # # # ',", + " ' ############ # ',", + " ' # # # ',", + " ' # # # ',", + " ' # # # ',", + " ' # # # ',", + " ' # ## ',", + " ' # ############ ',", + " ' ### ### ',", + " ' ',", + " ' '", + "];", + "const result = thinImage(imageForTests);" + ] } } }, @@ -5074,13 +5712,20 @@ " return [[], []];", "}" ], - "head": "", - "tail": "const zm1 = [[0]];\nconst zm2 = [[0, 1], [2, 3]];\nconst zm5 = [\n [0, 1, 5, 6, 14],\n [2, 4, 7, 13, 15],\n [3, 8, 12, 16, 21],\n [9, 11, 17, 20, 22],\n [10, 18, 19, 23, 24]\n];" + "head": [], + "tail": [ + "const zm1 = [[0]];", + "const zm2 = [[0, 1], [2, 3]];", + "const zm5 = [", + " [0, 1, 5, 6, 14],", + " [2, 4, 7, 13, 15],", + " [3, 8, 12, 16, 21],", + " [9, 11, 17, 20, 22],", + " [10, 18, 19, 23, 24]", + "];" + ] } } } - ], - "fileName": "08-coding-interview-questions-and-take-home-assignments/rosetta-code-problems.json", - "superBlock": "coding-interview-questions-and-take-home-assignments", - "superOrder": 8 + ] } \ No newline at end of file diff --git a/packages/learn/seed/challenges/09-certificates/apis-and-microservices-certificate.json b/packages/learn/seed/challenges/09-certificates/apis-and-microservices-certificate.json new file mode 100644 index 0000000000..8af756f63a --- /dev/null +++ b/packages/learn/seed/challenges/09-certificates/apis-and-microservices-certificate.json @@ -0,0 +1,37 @@ +{ + "name": "API's and Microservices Certificate", + "order": 5, + "isPrivate": true, + "challenges": [ + { + "id": "561add10cb82ac38a17523bc", + "title": "API's and Microservices Certificate", + "challengeType": 7, + "description": [], + "challengeSeed": [], + "isPrivate": true, + "tests": [ + { + "id": "bd7158d8c443edefaeb5bdef", + "title": "Timestamp Microservice" + }, + { + "id": "bd7158d8c443edefaeb5bdff", + "title": "Request Header Parser Microservice" + }, + { + "id": "bd7158d8c443edefaeb5bd0e", + "title": "URL Shortener Microservice" + }, + { + "id": "bd7158d8c443edefaeb5bdee", + "title": "Exercise Tracker" + }, + { + "id": "bd7158d8c443edefaeb5bd0f", + "title": "File Metadata Microservice" + } + ] + } + ] +} diff --git a/packages/learn/seed/challenges/09-certificates/data-visualization-certificate.json b/packages/learn/seed/challenges/09-certificates/data-visualization-certificate.json new file mode 100644 index 0000000000..62a4795f29 --- /dev/null +++ b/packages/learn/seed/challenges/09-certificates/data-visualization-certificate.json @@ -0,0 +1,37 @@ +{ + "name": "Data Visualization Certificate", + "order": 4, + "isPrivate": true, + "challenges": [ + { + "id": "5a553ca864b52e1d8bceea14", + "title": "Data Visualization Certificate", + "challengeType": 7, + "description": [], + "challengeSeed": [], + "isPrivate": true, + "tests": [ + { + "id": "bd7168d8c242eddfaeb5bd13", + "title": "Visualize Data with a Bar Chart" + }, + { + "id": "bd7178d8c242eddfaeb5bd13", + "title": "Visualize Data with a Scatterplot Graph" + }, + { + "id": "bd7188d8c242eddfaeb5bd13", + "title": "Visualize Data with a Heat Map" + }, + { + "id": "587d7fa6367417b2b2512bbf", + "title": "Visualize Data with a Choropleth Map" + }, + { + "id": "587d7fa6367417b2b2512bc0", + "title": "Visualize Data with a Treemap Diagram" + } + ] + } + ] +} diff --git a/packages/learn/seed/challenges/09-certificates/front-end-libraries-certificate.json b/packages/learn/seed/challenges/09-certificates/front-end-libraries-certificate.json new file mode 100644 index 0000000000..0fec97df90 --- /dev/null +++ b/packages/learn/seed/challenges/09-certificates/front-end-libraries-certificate.json @@ -0,0 +1,37 @@ +{ + "name": "Front End Libraries Certificate", + "order": 3, + "isPrivate": true, + "challenges": [ + { + "id": "561acd10cb82ac38a17513bc", + "title": "Front End Libraries Certificate", + "challengeType": 7, + "description": [], + "challengeSeed": [], + "isPrivate": true, + "tests": [ + { + "id": "bd7158d8c442eddfaeb5bd13", + "title": "Build a Random Quote Machine" + }, + { + "id": "bd7157d8c242eddfaeb5bd13", + "title": "Build a Markdown Previewer" + }, + { + "id": "587d7dbc367417b2b2512bae", + "title": "Build a Drum Machine" + }, + { + "id": "bd7158d8c442eddfaeb5bd17", + "title": "Build a JavaScript Calculator" + }, + { + "id": "bd7158d8c442eddfaeb5bd0f", + "title": "Build a Pomodoro Clock" + } + ] + } + ] +} diff --git a/packages/learn/seed/challenges/09-certificates/information-security-and-quality-assurance-certificate.json b/packages/learn/seed/challenges/09-certificates/information-security-and-quality-assurance-certificate.json new file mode 100644 index 0000000000..611f72052a --- /dev/null +++ b/packages/learn/seed/challenges/09-certificates/information-security-and-quality-assurance-certificate.json @@ -0,0 +1,37 @@ +{ + "name": "Information, Securtiy and Quality Assurance Certificate", + "order": 6, + "isPrivate": true, + "challenges": [ + { + "id": "561add10cb82ac38a17213bc", + "title": "Information, Securtiy and Quality Assurance Certificate", + "challengeType": 7, + "description": [], + "challengeSeed": [], + "isPrivate": true, + "tests": [ + { + "id": "587d8249367417b2b2512c42", + "title": "Issue Tracker" + }, + { + "id": "587d8249367417b2b2512c41", + "title": "Metric-Imperial Converter" + }, + { + "id": "587d824a367417b2b2512c43", + "title": "Personal Library" + }, + { + "id": "587d824a367417b2b2512c44", + "title": "Stock Price Checker" + }, + { + "id": "587d824a367417b2b2512c45", + "title": "Anonymous Message Board" + } + ] + } + ] +} diff --git a/packages/learn/seed/challenges/09-certificates/javascript-algorithms-and-data-structures-certificate.json b/packages/learn/seed/challenges/09-certificates/javascript-algorithms-and-data-structures-certificate.json new file mode 100644 index 0000000000..08ae2cee7d --- /dev/null +++ b/packages/learn/seed/challenges/09-certificates/javascript-algorithms-and-data-structures-certificate.json @@ -0,0 +1,37 @@ +{ + "name": "JavaScript Algorithms and Data Structures Certificate", + "order": 2, + "isPrivate": true, + "challenges": [ + { + "id": "561abd10cb81ac38a17513bc", + "title": "JavaScript Algorithms and Data Structures Certificate", + "challengeType": 7, + "description": [], + "challengeSeed": [], + "isPrivate": true, + "tests": [ + { + "id": "aaa48de84e1ecc7c742e1124", + "title": "Palindrome Checker" + }, + { + "id": "a7f4d8f2483413a6ce226cac", + "title": "Roman Numeral Converter" + }, + { + "id": "56533eb9ac21ba0edf2244e2", + "title": "Caesars Cipher" + }, + { + "id": "aff0395860f5d3034dc0bfc9", + "title": "Telephone Number Validator" + }, + { + "id": "aa2e6f85cab2ab736c9a9b24", + "title": "Cash Register" + } + ] + } + ] +} diff --git a/packages/learn/seed/challenges/09-certificates/legacy-back-end-certificate.json b/packages/learn/seed/challenges/09-certificates/legacy-back-end-certificate.json new file mode 100644 index 0000000000..3c66e3d6fd --- /dev/null +++ b/packages/learn/seed/challenges/09-certificates/legacy-back-end-certificate.json @@ -0,0 +1,57 @@ +{ + "name": "Legacy Back End Certificate", + "order": 1, + "isPrivate": true, + "challenges": [ + { + "id": "660add10cb82ac38a17513be", + "title": "Legacy Back End Certificate", + "challengeType": 7, + "description": [], + "challengeSeed": [], + "isPrivate": true, + "tests": [ + { + "id": "bd7158d8c443edefaeb5bdef", + "title": "Timestamp Microservice" + }, + { + "id": "bd7158d8c443edefaeb5bdff", + "title": "Request Header Parser Microservice" + }, + { + "id": "bd7158d8c443edefaeb5bd0e", + "title": "URL Shortener Microservice" + }, + { + "id": "bd7158d8c443edefaeb5bdee", + "title": "Image Search Abstraction Layer" + }, + { + "id": "bd7158d8c443edefaeb5bd0f", + "title": "File Metadata Microservice" + }, + { + "id": "bd7158d8c443eddfaeb5bdef", + "title": "Build a Voting App" + }, + { + "id": "bd7158d8c443eddfaeb5bdff", + "title": "Build a Nightlife Coordination App" + }, + { + "id": "bd7158d8c443eddfaeb5bd0e", + "title": "Chart the Stock Market" + }, + { + "id": "bd7158d8c443eddfaeb5bd0f", + "title": "Manage a Book Trading Club" + }, + { + "id": "bd7158d8c443eddfaeb5bdee", + "title": "Build a Pinterest Clone" + } + ] + } + ] +} diff --git a/packages/learn/seed/challenges/09-certificates/legacy-data-visualization-certificate.json b/packages/learn/seed/challenges/09-certificates/legacy-data-visualization-certificate.json new file mode 100644 index 0000000000..de47b9cb45 --- /dev/null +++ b/packages/learn/seed/challenges/09-certificates/legacy-data-visualization-certificate.json @@ -0,0 +1,57 @@ +{ + "name": "Legacy Data Visualization Certificate", + "order": 1, + "isPrivate": true, + "challenges": [ + { + "id": "561add10cb82ac39a17513bc", + "title": "Legacy Data Visualization Certificate", + "challengeType": 7, + "description": [], + "challengeSeed": [], + "isPrivate": true, + "tests": [ + { + "id": "bd7157d8c242eddfaeb5bd13", + "title": "Build a Markdown Previewer" + }, + { + "id": "bd7156d8c242eddfaeb5bd13", + "title": "Build a Camper Leaderboard" + }, + { + "id": "bd7155d8c242eddfaeb5bd13", + "title": "Build a Recipe Box" + }, + { + "id": "bd7154d8c242eddfaeb5bd13", + "title": "Build the Game of Life" + }, + { + "id": "bd7153d8c242eddfaeb5bd13", + "title": "Build a Roguelike Dungeon Crawler Game" + }, + { + "id": "bd7168d8c242eddfaeb5bd13", + "title": "Visualize Data with a Bar Chart" + }, + { + "id": "bd7178d8c242eddfaeb5bd13", + "title": "Visualize Data with a Scatterplot Graph" + }, + { + "id": "bd7188d8c242eddfaeb5bd13", + "title": "Visualize Data with a Heat Map" + }, + { + "id": "bd7198d8c242eddfaeb5bd13", + "title": "Show National Contiguity with a Force Directed Graph" + }, + { + "id": "bd7108d8c242eddfaeb5bd13", + "title": "Map Data Across the Globe" + } + ] + } + ] +} diff --git a/packages/learn/seed/challenges/09-certificates/legacy-front-end-certificate.json b/packages/learn/seed/challenges/09-certificates/legacy-front-end-certificate.json new file mode 100644 index 0000000000..c6342a5a12 --- /dev/null +++ b/packages/learn/seed/challenges/09-certificates/legacy-front-end-certificate.json @@ -0,0 +1,57 @@ +{ + "name": "Legacy Front End Certificate", + "order": 1, + "isPrivate": true, + "challenges": [ + { + "id": "561add10cb82ac38a17513be", + "title": "Legacy Front End Certificate", + "challengeType": 7, + "description": [], + "challengeSeed": [], + "isPrivate": true, + "tests": [ + { + "id": "bd7158d8c242eddfaeb5bd13", + "title": "Build a Personal Portfolio Webpage" + }, + { + "id": "bd7158d8c442eddfaeb5bd13", + "title": "Build a Random Quote Machine" + }, + { + "id": "bd7158d8c442eddfaeb5bd0f", + "title": "Build a Pomodoro Clock" + }, + { + "id": "bd7158d8c442eddfaeb5bd17", + "title": "Build a JavaScript Calculator" + }, + { + "id": "bd7158d8c442eddfaeb5bd10", + "title": "Show the Local Weather" + }, + { + "id": "bd7158d8c442eddfaeb5bd1f", + "title": "Use the Twitch JSON API" + }, + { + "id": "bd7158d8c442eddfaeb5bd18", + "title": "Stylize Stories on Camper News" + }, + { + "id": "bd7158d8c442eddfaeb5bd19", + "title": "Build a Wikipedia Viewer" + }, + { + "id": "bd7158d8c442eedfaeb5bd1c", + "title": "Build a Tic Tac Toe Game" + }, + { + "id": "bd7158d8c442eddfaeb5bd1c", + "title": "Build a Simon Game" + } + ] + } + ] +} diff --git a/packages/learn/seed/challenges/09-certificates/responsive-web-design-certificate.json b/packages/learn/seed/challenges/09-certificates/responsive-web-design-certificate.json new file mode 100644 index 0000000000..e16a4bdabf --- /dev/null +++ b/packages/learn/seed/challenges/09-certificates/responsive-web-design-certificate.json @@ -0,0 +1,37 @@ +{ + "name": "Responsive Web Design Certificate", + "order": 1, + "isPrivate": true, + "challenges": [ + { + "id": "561add10cb82ac38a17513bc", + "title": "Responsive Web Design Certificate", + "challengeType": 7, + "description": [], + "challengeSeed": [], + "isPrivate": true, + "tests": [ + { + "id": "bd7158d8c442eddfaeb5bd18", + "title": "Build a Tribute Page" + }, + { + "id": "587d78af367417b2b2512b03", + "title": "Build a Survey Form" + }, + { + "id": "587d78af367417b2b2512b04", + "title": "Build a Product Landing Page" + }, + { + "id": "587d78b0367417b2b2512b05", + "title": "Build a Technical Documentation Page" + }, + { + "id": "587d78b0367417b2b2512b06", + "title": "Build a Personal Portfolio Webpage" + } + ] + } + ] +} diff --git a/packages/learn/src/pages/auth-callback.js b/packages/learn/src/auth/auth-callback.js similarity index 93% rename from packages/learn/src/pages/auth-callback.js rename to packages/learn/src/auth/auth-callback.js index f448386663..50222739d8 100644 --- a/packages/learn/src/pages/auth-callback.js +++ b/packages/learn/src/auth/auth-callback.js @@ -1,3 +1,6 @@ +/* + TODO(Bouncey): Placed in ./src/pages when we have auth +*/ import React from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; diff --git a/packages/learn/src/components/Header/header.css b/packages/learn/src/components/Header/header.css index 32b9784e67..845467f455 100644 --- a/packages/learn/src/components/Header/header.css +++ b/packages/learn/src/components/Header/header.css @@ -1,16 +1,49 @@ +header { + top: 0; + position: fixed; + width: 100%; + z-index: 200; +} + #top-nav { background: #006400; margin-bottom: 0.45rem; + height: 38px; + margin-bottom: 0px; + border-radius: 0; + border: none; + display: flex; + justify-content: space-between; +} + +#top-nav .home-link { + display: flex; + align-items: center; } #top-nav img { - margin-bottom: 0; + max-height: 36px; + margin: 0 5px 0 10px; } -.top-nav-container { - margin: 0 auto; - max-width: 960px; +#top-right-nav { + display: flex; + margin: 0; + list-style: none; +} + +#top-right-nav li { display: flex; - justify-content: space-between; align-items: center; -} \ No newline at end of file + margin: 0px 10px; +} + +#top-right-nav li > a { + color:#fff; + font-size: 17px; +} + +#top-right-nav li > a:hover, #top-right-nav li > a:focus { + text-decoration: none; + font-weight: 700; +} diff --git a/packages/learn/src/components/Header/index.js b/packages/learn/src/components/Header/index.js index a43039e1d3..a7074380ca 100644 --- a/packages/learn/src/components/Header/index.js +++ b/packages/learn/src/components/Header/index.js @@ -2,27 +2,27 @@ import React from 'react'; import Link from 'gatsby-link'; import './header.css'; -import UserState from './components/UserState'; function Header() { return ( -
      -
      - +
      +
      + +
      ); } diff --git a/packages/learn/src/components/Map/Map.js b/packages/learn/src/components/Map/Map.js index db58cd46eb..4a4d775b9d 100644 --- a/packages/learn/src/components/Map/Map.js +++ b/packages/learn/src/components/Map/Map.js @@ -24,10 +24,12 @@ class ShowMap extends PureComponent { const { nodes } = this.props; const superBlocks = uniq(nodes.map(({ superBlock }) => superBlock)); return ( -
        - {this.renderSuperBlocks(superBlocks)} - -
      +
      +
        + {this.renderSuperBlocks(superBlocks)} + +
      +
      ); } } diff --git a/packages/learn/src/components/Map/__snapshots__/Map.test.js.snap b/packages/learn/src/components/Map/__snapshots__/Map.test.js.snap index 1d1d25a4e3..b3de6f94bb 100644 --- a/packages/learn/src/components/Map/__snapshots__/Map.test.js.snap +++ b/packages/learn/src/components/Map/__snapshots__/Map.test.js.snap @@ -1,237 +1,241 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[` snapshot: Map 1`] = ` -
        - +
          + - + - -
        + ] + } + superBlock="Super Block Two" + /> + +
      + `; diff --git a/packages/learn/src/components/Map/map.css b/packages/learn/src/components/Map/map.css index 0ea7353ab6..9b5fa81bfd 100644 --- a/packages/learn/src/components/Map/map.css +++ b/packages/learn/src/components/Map/map.css @@ -1,9 +1,9 @@ -aside#map { +.map-ui { height: 100%; max-height: calc(100vh - (45px + 1.45rem)); } -aside#map ul { +.map-ui ul { list-style: none; color: #006400; } @@ -20,6 +20,6 @@ aside#map ul { flex-shrink: 0 } -li.open>.map-title svg { +li.open > .map-title svg { transform: rotate(90deg); } \ No newline at end of file diff --git a/packages/learn/src/components/MapModal/index.js b/packages/learn/src/components/MapModal/index.js new file mode 100644 index 0000000000..c1a8982a5d --- /dev/null +++ b/packages/learn/src/components/MapModal/index.js @@ -0,0 +1,52 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import { createSelector } from 'reselect'; +import { Modal } from 'react-bootstrap'; + +import { ChallengeNode } from '../../redux/propTypes'; +import Map from '../Map'; +import { toggleMapModal, isMapModalOpenSelector } from '../../redux/app'; + +import Spacer from '../util/Spacer'; + +const mapStateToProps = createSelector(isMapModalOpenSelector, show => ({ + show +})); + +const mapDispatchToProps = dispatch => + bindActionCreators({ toggleMapModal }, dispatch); + +const propTypes = { + nodes: PropTypes.arrayOf(ChallengeNode), + show: PropTypes.bool, + toggleMapModal: PropTypes.func.isRequired +}; + +function MapModal({ nodes, show, toggleMapModal }) { + return ( + + + + A Map to Learn to Code + + + + + + + + + ); +} + +MapModal.displayName = 'MapModal'; +MapModal.propTypes = propTypes; + +export default connect(mapStateToProps, mapDispatchToProps)(MapModal); diff --git a/packages/learn/src/components/MapModal/map-modal.css b/packages/learn/src/components/MapModal/map-modal.css new file mode 100644 index 0000000000..677b0dea0e --- /dev/null +++ b/packages/learn/src/components/MapModal/map-modal.css @@ -0,0 +1,3 @@ +.map-modal .map-ui { + overflow-y: scroll; +} \ No newline at end of file diff --git a/packages/learn/src/components/formHelpers/BlockSaveButton.js b/packages/learn/src/components/formHelpers/BlockSaveButton.js index d3fb19de91..a214ff1f85 100644 --- a/packages/learn/src/components/formHelpers/BlockSaveButton.js +++ b/packages/learn/src/components/formHelpers/BlockSaveButton.js @@ -4,7 +4,7 @@ import { Button } from 'react-bootstrap'; function BlockSaveButton(props) { return ( - ); diff --git a/packages/learn/src/components/formHelpers/Form.js b/packages/learn/src/components/formHelpers/Form.js index a1ddc8055f..3bdf557a93 100644 --- a/packages/learn/src/components/formHelpers/Form.js +++ b/packages/learn/src/components/formHelpers/Form.js @@ -44,7 +44,11 @@ export function DynamicForm({ submit }) { return ( -
      + {hideButton ? null : ( diff --git a/packages/learn/src/components/formHelpers/FormFields.js b/packages/learn/src/components/formHelpers/FormFields.js index 9372a5c6df..5152aa2fed 100644 --- a/packages/learn/src/components/formHelpers/FormFields.js +++ b/packages/learn/src/components/formHelpers/FormFields.js @@ -1,15 +1,16 @@ import React from 'react'; -import _ from 'lodash'; +import { kebabCase, startCase } from 'lodash'; import PropTypes from 'prop-types'; import { Alert, Col, ControlLabel, FormControl, - HelpBlock, - Row + HelpBlock } from 'react-bootstrap'; +import './form-fields.css'; + const propTypes = { errors: PropTypes.objectOf(PropTypes.string), fields: PropTypes.objectOf( @@ -44,13 +45,13 @@ function FormFields(props) { .filter(field => !ignored.includes(field)) .map(key => fields[key]) .map(({ name, onChange, value, pristine }) => { - const key = _.kebabCase(name); + const key = kebabCase(name); const type = name in types ? types[name] : 'text'; return ( - +
      {type === 'hidden' ? null : ( - {_.startCase(name)} + {startCase(name)} )} @@ -72,7 +73,7 @@ function FormFields(props) { ) : null} - +
      ); })} diff --git a/packages/learn/src/components/formHelpers/__snapshots__/BlockSaveButton.test.js.snap b/packages/learn/src/components/formHelpers/__snapshots__/BlockSaveButton.test.js.snap index ac1e9f95dd..b55c920134 100644 --- a/packages/learn/src/components/formHelpers/__snapshots__/BlockSaveButton.test.js.snap +++ b/packages/learn/src/components/formHelpers/__snapshots__/BlockSaveButton.test.js.snap @@ -2,7 +2,7 @@ exports[` snapshot 1`] = ` ); IndexPage.displayName = 'IndexPage'; IndexPage.propTypes = propTypes; -export default IndexPage; +export default connect(mapStateToProps, mapDispatchToProps)(IndexPage); export const query = graphql` query FirstChallenge { diff --git a/packages/learn/src/pages/strange-place.js b/packages/learn/src/pages/strange-place.js deleted file mode 100644 index d615d3e004..0000000000 --- a/packages/learn/src/pages/strange-place.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; -// import PropTypes from 'prop-types'; -import Panel from 'react-bootstrap/lib/Panel'; - -import './strange-place.css'; - -const propTypes = {}; - -function StrangePlace(props) { - console.log(props); - return ( -
      - - - Whoops! - - -

      Something really weird happend and we are not sure what.

      -
      -

      - Could you help us fix this by supplying annonymous application data - for us to look over? -

      -

      We can show you exactly what we would like to send

      -
      -
      -
      - ); -} - -StrangePlace.displayName = 'StrangePlace'; -StrangePlace.propTypes = propTypes; - -export default StrangePlace; diff --git a/packages/learn/src/redux/app/index.js b/packages/learn/src/redux/app/index.js index 2fdf0319a2..792d4477e6 100644 --- a/packages/learn/src/redux/app/index.js +++ b/packages/learn/src/redux/app/index.js @@ -4,33 +4,73 @@ import { createTypes } from '../../../utils/stateManagment'; const ns = 'app'; +function userIdentReplacer(state) { + return { + ...state, + [ns]: { + ...state[ns], + user: { + ...state[ns].user, + about: '**blank**', + email: '**blank**', + facebook: '**blank**', + githubProfile: '**blank**', + linkedin: '**blank**', + location: '**blank**', + name: '**blank**', + picture: '**blank**', + portfolio: '**blank**', + twitter: '**blank**', + username: '**blank**', + website: '**blank**' + } + } + }; +} + export const epics = []; export const types = createTypes( - ['fetchUser', 'fetchUserComplete', 'fetchUserError', 'updateUserSignedIn'], + [ + 'fetchUser', + 'fetchUserComplete', + 'fetchUserError', + 'updateUserSignedIn', + 'toggleMapModal' + ], ns ); const initialState = { isSignedIn: false, - user: {} + user: {}, + showMapModal: false }; export const fetchUser = createAction(types.fetchUser); export const fetchUserComplete = createAction(types.fetchUserComplete); export const fecthUserError = createAction(types.fetchUserError); +export const toggleMapModal = createAction(types.toggleMapModal); + export const updateUserSignedIn = createAction(types.updateUserSignedIn); +export const isMapModalOpenSelector = state => state[ns].showMapModal; export const isSignedInSelector = state => state[ns].isSignedIn; export const userSelector = state => state[ns].user; +export const allAppDataSelector = state => userIdentReplacer(state); + export const reducer = handleActions( { [types.fetchUserComplete]: (state, { payload }) => ({ ...state, user: payload }), + [types.toggleMapModal]: state => ({ + ...state, + showMapModal: !state.showMapModal + }), [types.updateUserSignedIn]: (state, { payload }) => ({ ...state, isSignedIn: payload diff --git a/packages/learn/src/templates/Challenges/backend/Show.js b/packages/learn/src/templates/Challenges/backend/Show.js index 8c8f30da64..70fadacf38 100644 --- a/packages/learn/src/templates/Challenges/backend/Show.js +++ b/packages/learn/src/templates/Challenges/backend/Show.js @@ -10,6 +10,7 @@ import ChallengeDescription from '../components/Challenge-Description'; import TestSuite from '../components/Test-Suite'; import Output from '../components/Output'; import CompletionModal from '../components/CompletionModal'; +import ProjectToolPanel from '../project/Tool-Panel'; import { executeChallenge, challengeTestsSelector, @@ -25,6 +26,7 @@ import { makeRequired, Form } from '../../../components/formHelpers'; +import Spacer from '../../../components/util/Spacer'; // provided by redux form const reduxFormPropTypes = { @@ -117,12 +119,14 @@ export class BackEnd extends PureComponent { const blockNameTitle = `${blockName} - ${title}`; return ( + - + +
      {blockNameTitle} - - +
      +
      - - +
      +

      - - +
      +
      - +
      +
      diff --git a/packages/learn/src/templates/Challenges/classic/Show.js b/packages/learn/src/templates/Challenges/classic/Show.js index bff563108f..4a123ce7c1 100644 --- a/packages/learn/src/templates/Challenges/classic/Show.js +++ b/packages/learn/src/templates/Challenges/classic/Show.js @@ -10,6 +10,8 @@ import { ReflexContainer, ReflexSplitter, ReflexElement } from 'react-reflex'; import Editor from './Editor'; import Preview from '../components/Preview'; import SidePanel from '../components/Side-Panel'; +import TestSuite from '../components/Test-Suite'; +import Output from '../components/Output'; import CompletionModal from '../components/CompletionModal'; import HelpModal from '../components/HelpModal'; import ResetModal from '../components/ResetModal'; @@ -21,17 +23,28 @@ import { ChallengeNode } from '../../../redux/propTypes'; import { createFiles, challengeFilesSelector, + challengeTestsSelector, initTests, updateChallengeMeta, challengeMounted, - updateSuccessMessage + updateSuccessMessage, + consoleOutputSelector } from '../redux'; import './classic.css'; +import ToolPanel from '../components/Tool-Panel'; +import Spacer from '../../../components/util/Spacer'; -const mapStateToProps = createSelector(challengeFilesSelector, files => ({ - files -})); +const mapStateToProps = createSelector( + challengeFilesSelector, + challengeTestsSelector, + consoleOutputSelector, + (files, tests, output) => ({ + files, + tests, + output + }) +); const mapDispatchToProps = dispatch => bindActionCreators( @@ -55,11 +68,18 @@ const propTypes = { key: PropTypes.string }), initTests: PropTypes.func.isRequired, + output: PropTypes.string, pathContext: PropTypes.shape({ challengeMeta: PropTypes.shape({ nextchallengePath: PropTypes.string }) }), + tests: PropTypes.arrayOf( + PropTypes.shape({ + text: PropTypes.string, + testString: PropTypes.string + }) + ), updateChallengeMeta: PropTypes.func.isRequired, updateSuccessMessage: PropTypes.func.isRequired }; @@ -115,7 +135,9 @@ class ShowClassic extends PureComponent { guideUrl } }, - files + files, + tests, + output } = this.props; const editors = Object.keys(files) .map(key => files[key]) @@ -125,6 +147,21 @@ class ShowClassic extends PureComponent { + {index + 1 === Object.keys(files).length && } + {index + 1 === Object.keys(files).length ? ( + + + + ) : null} )); @@ -134,7 +171,8 @@ class ShowClassic extends PureComponent { const blockNameTitle = `${blockName} - ${title}`; return ( - + + - {showPreview && } - {showPreview && ( - - - - )} + + + {showPreview ? : null} + + + + diff --git a/packages/learn/src/templates/Challenges/classic/classic.css b/packages/learn/src/templates/Challenges/classic/classic.css index a7d7f58fc4..0f3da75b09 100644 --- a/packages/learn/src/templates/Challenges/classic/classic.css +++ b/packages/learn/src/templates/Challenges/classic/classic.css @@ -1,9 +1,15 @@ -.editor, -.react-codemirror2, -.react-codemirror2 > .CodeMirror-wrap { +.editor{ height: 100%; + margin-bottom: 1.45rem; } .instructions-panel { padding: 0 10px; +} + +.react-monaco-editor-container { + width: 100%; + height: 100%; + display: flex; + align-items: end; } \ No newline at end of file diff --git a/packages/learn/src/templates/Challenges/components/Challenge-Description.js b/packages/learn/src/templates/Challenges/components/Challenge-Description.js index 474b315d1b..871f138693 100644 --- a/packages/learn/src/templates/Challenges/components/Challenge-Description.js +++ b/packages/learn/src/templates/Challenges/components/Challenge-Description.js @@ -3,6 +3,8 @@ import PropTypes from 'prop-types'; import { Col, Row } from 'react-bootstrap'; import { descriptionRegex } from '../../../../utils'; +import './challenge-description.css'; + const propTypes = { description: PropTypes.arrayOf(PropTypes.string) }; diff --git a/packages/learn/src/templates/Challenges/components/CompletionModal.js b/packages/learn/src/templates/Challenges/components/CompletionModal.js index 031daf7a7a..7dc0d97e9c 100644 --- a/packages/learn/src/templates/Challenges/components/CompletionModal.js +++ b/packages/learn/src/templates/Challenges/components/CompletionModal.js @@ -7,6 +7,8 @@ import { Button, Modal } from 'react-bootstrap'; import GreenPass from './icons/GreenPass'; +import './completion-modal.css'; + import { closeModal, submitChallenge, @@ -58,22 +60,22 @@ export class CompletionModal extends PureComponent { return ( - - {message} + + {message} - -
      -
      -
      - -
      -
      + +
      +
      diff --git a/packages/learn/src/templates/Challenges/components/HelpModal.js b/packages/learn/src/templates/Challenges/components/HelpModal.js index bac825e2c0..e4ebce99df 100644 --- a/packages/learn/src/templates/Challenges/components/HelpModal.js +++ b/packages/learn/src/templates/Challenges/components/HelpModal.js @@ -27,12 +27,12 @@ export class HelpModal extends PureComponent { render() { const { isOpen, closeHelpModal, createQuestion } = this.props; return ( - - - Ask for help? - - × - + + + Ask for help?

      diff --git a/packages/learn/src/templates/Challenges/components/Output.js b/packages/learn/src/templates/Challenges/components/Output.js index 518fb0e3de..cb5c9afd20 100644 --- a/packages/learn/src/templates/Challenges/components/Output.js +++ b/packages/learn/src/templates/Challenges/components/Output.js @@ -4,6 +4,7 @@ import MonacoEditor from 'react-monaco-editor'; const propTypes = { defaultOutput: PropTypes.string, + height: PropTypes.number, output: PropTypes.string }; @@ -20,13 +21,13 @@ const options = { wordWrap: 'on' }; -function Output({ output, defaultOutput }) { +function Output({ output, defaultOutput, height }) { return ( diff --git a/packages/learn/src/templates/Challenges/components/ResetModal.js b/packages/learn/src/templates/Challenges/components/ResetModal.js index 791a1942a9..5aa6c4ff81 100644 --- a/packages/learn/src/templates/Challenges/components/ResetModal.js +++ b/packages/learn/src/templates/Challenges/components/ResetModal.js @@ -7,6 +7,8 @@ import { Button, Modal } from 'react-bootstrap'; import { isResetModalOpenSelector, closeModal, resetChallenge } from '../redux'; +import './reset-modal.css'; + const propTypes = { close: PropTypes.func.isRequired, isOpen: PropTypes.bool.isRequired, @@ -31,15 +33,15 @@ function ResetModal({ reset, close, isOpen }) { return ( - - Reset this lesson? + + Reset this lesson? - +

      Are you sure you wish to reset this lesson? The editors and tests diff --git a/packages/learn/src/templates/Challenges/components/Side-Panel.js b/packages/learn/src/templates/Challenges/components/Side-Panel.js index 1756c4ecf5..b8b4bdb88a 100644 --- a/packages/learn/src/templates/Challenges/components/Side-Panel.js +++ b/packages/learn/src/templates/Challenges/components/Side-Panel.js @@ -1,57 +1,32 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import ReactDom from 'react-dom'; -import { createSelector } from 'reselect'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; +import { Button } from 'react-bootstrap'; -// import HelpModal from './Help-Modal.jsx'; -import ToolPanel from './Tool-Panel'; import ChallengeTitle from './Challenge-Title'; import ChallengeDescription from './Challenge-Description'; -import TestSuite from './Test-Suite'; -import Output from './Output'; import Spacer from '../../../components/util/Spacer'; -import { - consoleOutputSelector, - challengeTestsSelector, - executeChallenge, - initConsole, - openModal -} from '../redux'; +import { initConsole, openModal } from '../redux'; -const mapStateToProps = createSelector( - consoleOutputSelector, - challengeTestsSelector, - (output, tests) => ({ output, tests }) -); +const mapStateToProps = () => ({}); const mapDispatchToProps = dispatch => bindActionCreators( { - executeChallenge, initConsole, - openHelpModal: () => openModal('help'), - openResetModal: () => openModal('reset') + openHelpModal: () => openModal('help') }, dispatch ); const propTypes = { description: PropTypes.arrayOf(PropTypes.string), - executeChallenge: PropTypes.func.isRequired, guideUrl: PropTypes.string, initConsole: PropTypes.func.isRequired, openHelpModal: PropTypes.func.isRequired, - openResetModal: PropTypes.func.isRequired, - output: PropTypes.string, - tests: PropTypes.arrayOf( - PropTypes.shape({ - text: PropTypes.string, - testString: PropTypes.string - }) - ), title: PropTypes.string }; @@ -81,40 +56,38 @@ export class SidePanel extends PureComponent { } render() { - const { - title, - description, - tests = [], - output = '', - guideUrl, - executeChallenge, - openResetModal, - openHelpModal - } = this.props; + const { title, description, guideUrl, openHelpModal } = this.props; return ( -

      +
      +
      {title}
      - - -
      - + {guideUrl ? ( +
      + +
      +
      + ) : null} +
      ); } diff --git a/packages/learn/src/templates/Challenges/components/Tool-Panel.js b/packages/learn/src/templates/Challenges/components/Tool-Panel.js index f207b5da45..fbb5e62f0c 100644 --- a/packages/learn/src/templates/Challenges/components/Tool-Panel.js +++ b/packages/learn/src/templates/Challenges/components/Tool-Panel.js @@ -1,26 +1,61 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; import { Button } from 'react-bootstrap'; +import './tool-panel.css'; +import { openModal, executeChallenge } from '../redux'; +import { toggleMapModal } from '../../../redux/app'; + +const mapStateToProps = () => ({}); +const mapDispatchToProps = dispatch => + bindActionCreators( + { + executeChallenge, + openResetModal: () => openModal('reset'), + toggleMapModal + }, + dispatch + ); + const propTypes = { executeChallenge: PropTypes.func.isRequired, - guideUrl: PropTypes.string, - openHelpModal: PropTypes.func.isRequired, - openResetModal: PropTypes.func.isRequired + openResetModal: PropTypes.func.isRequired, + toggleMapModal: PropTypes.func.isRequired }; -function ToolPanel({ - executeChallenge, - guideUrl, - openResetModal, - openHelpModal -}) { +function ToolPanel({ executeChallenge, openResetModal, toggleMapModal }) { return ( -
      - +
      +
      + + +
      +
      +
      + ); +} + +ToolPanel.displayName = 'ToolPanel'; +ToolPanel.propTypes = propTypes; + +export default connect(mapStateToProps, mapDispatchToProps)(ToolPanel); + +/* +
      -
      - ); -} - -ToolPanel.displayName = 'ToolPanel'; -ToolPanel.propTypes = propTypes; - -export default ToolPanel; +*/ diff --git a/packages/learn/src/templates/Challenges/components/challenge-description.css b/packages/learn/src/templates/Challenges/components/challenge-description.css new file mode 100644 index 0000000000..ed3d2d4103 --- /dev/null +++ b/packages/learn/src/templates/Challenges/components/challenge-description.css @@ -0,0 +1,14 @@ +.challenge-instructions { + font-size: 16px; +} + +.challenge-instructions blockquote { + background-color: #eee; + color: #c7254e; + padding: 10px; + width: 100%; + margin: 0; + margin-bottom: 1.45rem; + font-family: monospace; + font-size: 16px; +} \ No newline at end of file diff --git a/packages/learn/src/templates/Challenges/components/completion-modal.css b/packages/learn/src/templates/Challenges/components/completion-modal.css new file mode 100644 index 0000000000..91542c63f0 --- /dev/null +++ b/packages/learn/src/templates/Challenges/components/completion-modal.css @@ -0,0 +1,12 @@ +.completion-modal-body { + height: 45vh; + display: flex; + justify-content: center; + align-items: center; +} + +.success-icon-wrapper > svg { + height: 30vh; + width: 30vh; +} + diff --git a/packages/learn/src/templates/Challenges/components/preview.css b/packages/learn/src/templates/Challenges/components/preview.css index 9baf72764b..45d0b34963 100644 --- a/packages/learn/src/templates/Challenges/components/preview.css +++ b/packages/learn/src/templates/Challenges/components/preview.css @@ -6,7 +6,7 @@ } .challenge-preview, .challenge-preview-frame { - height: calc(100vh - (45px + 1.45rem)); + height: calc(60vh); width: 100%; padding: 0; margin: 0; diff --git a/packages/learn/src/templates/Challenges/components/reset-modal.css b/packages/learn/src/templates/Challenges/components/reset-modal.css new file mode 100644 index 0000000000..5e561d1fe7 --- /dev/null +++ b/packages/learn/src/templates/Challenges/components/reset-modal.css @@ -0,0 +1,11 @@ +.reset-modal-header { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} + +.reset-modal-header .close { + color: #fff; + font-size: 28px; + text-shadow: none; +} \ No newline at end of file diff --git a/packages/learn/src/templates/Challenges/components/tool-panel.css b/packages/learn/src/templates/Challenges/components/tool-panel.css new file mode 100644 index 0000000000..833d76450c --- /dev/null +++ b/packages/learn/src/templates/Challenges/components/tool-panel.css @@ -0,0 +1,12 @@ +.tool-panel { + height: 40px; + display: flex; + justify-content: space-around; + align-items: center; + + background-color: #99C199; +} + +.centre-tool-panel { + width: 300px; +} \ No newline at end of file diff --git a/packages/learn/src/templates/Challenges/project/Show.js b/packages/learn/src/templates/Challenges/project/Show.js index 321496c450..cd80f17220 100644 --- a/packages/learn/src/templates/Challenges/project/Show.js +++ b/packages/learn/src/templates/Challenges/project/Show.js @@ -8,6 +8,7 @@ import Helmet from 'react-helmet'; import { randomCompliment } from '../utils/get-words'; import { ChallengeNode } from '../../../redux/propTypes'; +import ProjectForm from './ProjectForm'; import SidePanel from './Side-Panel'; import ToolPanel from './Tool-Panel'; import CompletionModal from '../components/CompletionModal'; @@ -16,8 +17,12 @@ import { bindActionCreators } from 'redux'; import { updateChallengeMeta, createFiles, - updateSuccessMessage + updateSuccessMessage, + openModal } from '../redux'; +import { frontEndProject } from '../../../../utils/challengeTypes'; + +import './project.css'; const mapStateToProps = () => ({}); const mapDispatchToProps = dispatch => @@ -25,7 +30,8 @@ const mapDispatchToProps = dispatch => { updateChallengeMeta, createFiles, - updateSuccessMessage + updateSuccessMessage, + openCompletionModal: () => openModal('completion') }, dispatch ); @@ -35,6 +41,7 @@ const propTypes = { data: PropTypes.shape({ challengeNode: ChallengeNode }), + openCompletionModal: PropTypes.func.isRequired, pathContext: PropTypes.shape({ challengeMeta: PropTypes.object }), @@ -82,19 +89,27 @@ export class Project extends PureComponent { description, guideUrl } - } + }, + openCompletionModal } = this.props; + const isFrontEnd = challengeType === frontEndProject; const blockNameTitle = `${blockName} - ${title}`; return ( - - + +
      + + +
      diff --git a/packages/learn/src/templates/Challenges/project/Side-Panel.js b/packages/learn/src/templates/Challenges/project/Side-Panel.js index 959f4b0a29..7adf63544f 100644 --- a/packages/learn/src/templates/Challenges/project/Side-Panel.js +++ b/packages/learn/src/templates/Challenges/project/Side-Panel.js @@ -1,6 +1,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import ChallengeTitle from '../components/Challenge-Title'; +import Spacer from '../../../components/util/Spacer'; const propTypes = { description: PropTypes.arrayOf(PropTypes.string), @@ -24,6 +25,7 @@ export default class SidePanel extends PureComponent { const { title, description, isCompleted } = this.props; return (
      + {title}
        {this.renderDescription(title, description)}
      diff --git a/packages/learn/src/templates/Challenges/project/Tool-Panel.js b/packages/learn/src/templates/Challenges/project/Tool-Panel.js index fbf9a1a697..6776b3be5b 100644 --- a/packages/learn/src/templates/Challenges/project/Tool-Panel.js +++ b/packages/learn/src/templates/Challenges/project/Tool-Panel.js @@ -1,15 +1,12 @@ -import React, { PureComponent, Fragment } from 'react'; +import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { Button } from 'react-bootstrap'; // import { submittingSelector } from './redux'; +import { toggleMapModal } from '../../../redux/app'; import { openModal } from '../redux'; -import { frontEndProject } from '../../../../utils/challengeTypes'; - -import ButtonSpacer from '../../../components/util/ButtonSpacer'; -import ProjectForm from './ProjectForm'; const mapStateToProps = () => ({}); @@ -17,30 +14,62 @@ const mapDispatchToProps = dispatch => bindActionCreators( { openHelpModal: () => openModal('help'), - openCompletionModal: () => openModal('completion') + toggleMapModal }, dispatch ); const propTypes = { - challengeType: PropTypes.number, guideUrl: PropTypes.string, - openCompletionModal: PropTypes.func.isRequired, - openHelpModal: PropTypes.func.isRequired + openHelpModal: PropTypes.func.isRequired, + toggleMapModal: PropTypes.func.isRequired }; export class ToolPanel extends PureComponent { render() { - const { - guideUrl, - challengeType, - openHelpModal, - openCompletionModal - } = this.props; - - const isFrontEnd = challengeType === frontEndProject; + const { guideUrl, openHelpModal, toggleMapModal } = this.props; return ( - +
      +
      + +
      +
      +
      + {guideUrl && ( + + )} + +
      +
      + ); + } +} + +ToolPanel.displayName = 'ProjectToolPanel'; +ToolPanel.propTypes = propTypes; + +export default connect(mapStateToProps, mapDispatchToProps)(ToolPanel); + +/** + * + * {guideUrl && ( @@ -67,11 +96,4 @@ export class ToolPanel extends PureComponent { - ); - } -} - -ToolPanel.displayName = 'ProjectToolPanel'; -ToolPanel.propTypes = propTypes; - -export default connect(mapStateToProps, mapDispatchToProps)(ToolPanel); + */ diff --git a/packages/learn/src/templates/Challenges/project/project.css b/packages/learn/src/templates/Challenges/project/project.css new file mode 100644 index 0000000000..8ef26196f4 --- /dev/null +++ b/packages/learn/src/templates/Challenges/project/project.css @@ -0,0 +1,8 @@ +.project-show-wrapper { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + max-width: 960px; + margin: 0 auto; +} \ No newline at end of file diff --git a/packages/learn/src/templates/Challenges/rechallenge/builders.js b/packages/learn/src/templates/Challenges/rechallenge/builders.js index b80530ef5a..ac7d5bc023 100644 --- a/packages/learn/src/templates/Challenges/rechallenge/builders.js +++ b/packages/learn/src/templates/Challenges/rechallenge/builders.js @@ -1,4 +1,4 @@ -import _ from 'lodash'; +import { template as _template } from 'lodash'; import { Observable } from 'rxjs'; import cond from 'lodash/cond'; import flow from 'lodash/flow'; @@ -54,7 +54,7 @@ export const cssToHtml = cond([ // template: String // ) => Observable[{ build: String, sources: Dictionary }] export function concatHtml(required, template) { - const createBody = template ? _.template(template) : defaultTemplate; + const createBody = template ? _template(template) : defaultTemplate; const source = this.shareReplay(); const sourceMap = source.flatMap(files => files.reduce((sources, file) => { diff --git a/packages/learn/src/templates/Challenges/redux/execute-challenge-epic.js b/packages/learn/src/templates/Challenges/redux/execute-challenge-epic.js index 9d26527315..90b4f5d321 100644 --- a/packages/learn/src/templates/Challenges/redux/execute-challenge-epic.js +++ b/packages/learn/src/templates/Challenges/redux/execute-challenge-epic.js @@ -12,7 +12,7 @@ import { concat } from 'rxjs/operators'; import { ofType, combineEpics } from 'redux-observable'; -import _ from 'lodash'; +import { overEvery, isString } from 'lodash'; import { types, @@ -78,7 +78,7 @@ function executeChallengeEpic(action$, { getState }, { document }) { .flatMap(tests => { return from(tests).pipe( map(({ message }) => message), - filter(_.overEvery(_.isString, Boolean)), + filter(overEvery(isString, Boolean)), map(updateConsole), concat(of(updateTests(tests))) ); diff --git a/packages/learn/src/templates/Challenges/utils/frame.js b/packages/learn/src/templates/Challenges/utils/frame.js index 7b732961b3..5fea762016 100644 --- a/packages/learn/src/templates/Challenges/utils/frame.js +++ b/packages/learn/src/templates/Challenges/utils/frame.js @@ -1,4 +1,4 @@ -import _ from 'lodash'; +import { toString, flow } from 'lodash'; import Rx, { Observable } from 'rxjs'; import { ShallowWrapper, ReactWrapper } from 'enzyme'; import Adapter15 from 'enzyme-adapter-react-15'; @@ -110,7 +110,7 @@ const writeTestDepsToDocument = frameReady => ctx => { // should not be used for modern tests.__source = sources && 'index' in sources ? sources['index'] : ''; // provide the file name and get the original source - tests.__getUserInput = fileName => _.toString(sources[fileName]); + tests.__getUserInput = fileName => toString(sources[fileName]); tests.__checkChallengePayload = checkChallengePayload; tests.__frameReady = frameReady; return ctx; @@ -129,7 +129,7 @@ const writeContentToFrame = ctx => { }; export const createMainFramer = (document, getState, proxyLogger) => - _.flow( + flow( createFrame(document, getState, mainId), mountFrame(document), addDepsToDocument, @@ -138,7 +138,7 @@ export const createMainFramer = (document, getState, proxyLogger) => ); export const createTestFramer = (document, getState, frameReady) => - _.flow( + flow( createFrame(document, getState, testId), mountFrame(document), addDepsToDocument, diff --git a/packages/learn/src/templates/Introduction/Intro.js b/packages/learn/src/templates/Introduction/Intro.js index eefc8d4261..7a19d2f1ab 100644 --- a/packages/learn/src/templates/Introduction/Intro.js +++ b/packages/learn/src/templates/Introduction/Intro.js @@ -18,7 +18,7 @@ const propTypes = { }) }; -function renderMenuItems({ edges }) { +function renderMenuItems({ edges = [] }) { return edges.map(({ node }) => node).map(({ title, fields: { slug } }) => ( {title} @@ -28,8 +28,10 @@ function renderMenuItems({ edges }) { function IntroductionPage({ data: { markdownRemark, allChallengeNode } }) { const { html, frontmatter: { block } } = markdownRemark; - const firstLesson = allChallengeNode.edges[0].node; - const firstLessonPath = firstLesson.fields.slug; + const firstLesson = allChallengeNode && allChallengeNode.edges[0].node; + const firstLessonPath = firstLesson + ? firstLesson.fields.slug + : '/strange-place'; return ( @@ -53,7 +55,7 @@ function IntroductionPage({ data: { markdownRemark, allChallengeNode } }) {

      Upcoming Lessons

      - {renderMenuItems(allChallengeNode)} + {allChallengeNode ? renderMenuItems(allChallengeNode) : null}
      diff --git a/packages/learn/yarn.lock b/packages/learn/yarn.lock index bfb8d63f03..85c44cc28e 100644 --- a/packages/learn/yarn.lock +++ b/packages/learn/yarn.lock @@ -1138,6 +1138,17 @@ babel-plugin-transform-global-system-wrapper@^0.3.4: dependencies: babel-template "^6.9.0" +babel-plugin-transform-imports@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-imports/-/babel-plugin-transform-imports-1.5.0.tgz#3105082ab489b1cee162e42d2ffe7b8f7c685f2e" + dependencies: + babel-types "^6.6.0" + is-valid-path "^0.1.1" + lodash.camelcase "^4.3.0" + lodash.findkey "^4.6.0" + lodash.kebabcase "^4.1.1" + lodash.snakecase "^4.1.1" + babel-plugin-transform-object-assign@^6.8.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz#f99d2f66f1a0b0d498e346c5359684740caa20ba" @@ -1407,7 +1418,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0, babel-types@^6.6.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: @@ -5301,6 +5312,12 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" +is-invalid-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-invalid-path/-/is-invalid-path-0.1.0.tgz#307a855b3cf1a938b44ea70d2c61106053714f34" + dependencies: + is-glob "^2.0.0" + is-nan@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.2.1.tgz#9faf65b6fb6db24b7f5c0628475ea71f988401e2" @@ -5465,6 +5482,12 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" +is-valid-path@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-valid-path/-/is-valid-path-0.1.1.tgz#110f9ff74c37f663e1ec7915eb451f2db93ac9df" + dependencies: + is-invalid-path "^0.1.0" + is-whitespace-character@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.1.tgz#9ae0176f3282b65457a1992cdb084f8a5f833e3b" @@ -6270,6 +6293,10 @@ lodash.filter@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" +lodash.findkey@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.findkey/-/lodash.findkey-4.6.0.tgz#83058e903b51cbb759d09ccf546dea3ea39c4718" + lodash.flatten@^4.2.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" @@ -6294,6 +6321,10 @@ lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" +lodash.kebabcase@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + lodash.map@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" @@ -6334,6 +6365,10 @@ lodash.reject@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" +lodash.snakecase@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + lodash.some@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"