Merge pull request #34 from Bouncey/feat/interviewPrep
Add interview prep section
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
644f34d2ad
commit
68eefa5565
@ -170,5 +170,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fileName": "05-apis-and-microservices/api-and-microservice-projects.json",
|
||||
"superBlock": "apis-and-microservices",
|
||||
"superOrder": 5
|
||||
}
|
@ -283,5 +283,8 @@
|
||||
"challengeType": 2,
|
||||
"translations": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fileName": "05-apis-and-microservices/basic-node-and-express.json",
|
||||
"superBlock": "apis-and-microservices",
|
||||
"superOrder": 5
|
||||
}
|
@ -278,5 +278,8 @@
|
||||
"challengeType": 2,
|
||||
"translations": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fileName": "05-apis-and-microservices/managing-packages-with-npm.json",
|
||||
"superBlock": "apis-and-microservices",
|
||||
"superOrder": 5
|
||||
}
|
@ -256,5 +256,8 @@
|
||||
"challengeType": 2,
|
||||
"translations": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fileName": "05-apis-and-microservices/mongodb-and-mongoose.json",
|
||||
"superBlock": "apis-and-microservices",
|
||||
"superOrder": 5
|
||||
}
|
@ -651,5 +651,8 @@
|
||||
"challengeType": 2,
|
||||
"translations": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fileName": "06-information-security-and-quality-assurance/advanced-express-tools.json",
|
||||
"superBlock": "information-security-and-quality-assurance",
|
||||
"superOrder": 6
|
||||
}
|
@ -333,5 +333,8 @@
|
||||
"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
|
||||
}
|
@ -294,5 +294,8 @@
|
||||
"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
|
||||
}
|
@ -811,5 +811,8 @@
|
||||
"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
|
||||
}
|
@ -0,0 +1,689 @@
|
||||
{
|
||||
"name": "Algorithms",
|
||||
"order": 1,
|
||||
"time": "",
|
||||
"helpRoom": "HelpJavaScript",
|
||||
"challenges": [
|
||||
{
|
||||
"id": "a3f503de51cf954ede28891d",
|
||||
"title": "Symmetric Difference",
|
||||
"description": [
|
||||
"Create a function that takes two or more arrays and returns an array of the <dfn>symmetric difference</dfn> (<code>△</code> or <code>⊕</code>) of the provided arrays.",
|
||||
"Given two sets (for example set <code>A = {1, 2, 3}</code> and set <code>B = {2, 3, 4}</code>), 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 (<code>A △ B = C = {1, 4}</code>). For every additional symmetric difference you take (say on a set <code>D = {2, 3}</code>), you should get the set with elements which are in either of the two the sets but not both (<code>C △ D = {1, 4} △ {2, 3} = {1, 2, 3, 4}</code>). The resulting array must contain only unique values (<em>no duplicates</em>).",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code."
|
||||
],
|
||||
"solutions": [
|
||||
"function sym() {\n var arrays = [].slice.call(arguments);\n return arrays.reduce(function (symDiff, arr) {\n return symDiff.concat(arr).filter(function (val, idx, theArr) {\n return theArr.indexOf(val) === idx \n && (symDiff.indexOf(val) === -1 || arr.indexOf(val) === -1);\n });\n });\n}\nsym([1, 2, 3], [5, 2, 1, 4]);\n"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>sym([1, 2, 3], [5, 2, 1, 4])</code> should return <code>[3, 4, 5]</code>.",
|
||||
"testString": "assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4]), [3, 4, 5], '<code>sym([1, 2, 3], [5, 2, 1, 4])</code> should return <code>[3, 4, 5]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([1, 2, 3], [5, 2, 1, 4])</code> should contain only three elements.",
|
||||
"testString": "assert.equal(sym([1, 2, 3], [5, 2, 1, 4]).length, 3, '<code>sym([1, 2, 3], [5, 2, 1, 4])</code> should contain only three elements.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([1, 2, 3, 3], [5, 2, 1, 4])</code> should return <code>[3, 4, 5]</code>.",
|
||||
"testString": "assert.sameMembers(sym([1, 2, 3, 3], [5, 2, 1, 4]), [3, 4, 5], '<code>sym([1, 2, 3, 3], [5, 2, 1, 4])</code> should return <code>[3, 4, 5]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([1, 2, 3, 3], [5, 2, 1, 4])</code> should contain only three elements.",
|
||||
"testString": "assert.equal(sym([1, 2, 3, 3], [5, 2, 1, 4]).length, 3, '<code>sym([1, 2, 3, 3], [5, 2, 1, 4])</code> should contain only three elements.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([1, 2, 3], [5, 2, 1, 4, 5])</code> should return <code>[3, 4, 5]</code>.",
|
||||
"testString": "assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4, 5]), [3, 4, 5], '<code>sym([1, 2, 3], [5, 2, 1, 4, 5])</code> should return <code>[3, 4, 5]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([1, 2, 3], [5, 2, 1, 4, 5])</code> should contain only three elements.",
|
||||
"testString": "assert.equal(sym([1, 2, 3], [5, 2, 1, 4, 5]).length, 3, '<code>sym([1, 2, 3], [5, 2, 1, 4, 5])</code> should contain only three elements.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([1, 2, 5], [2, 3, 5], [3, 4, 5])</code> should return <code>[1, 4, 5]</code>",
|
||||
"testString": "assert.sameMembers(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], '<code>sym([1, 2, 5], [2, 3, 5], [3, 4, 5])</code> should return <code>[1, 4, 5]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([1, 2, 5], [2, 3, 5], [3, 4, 5])</code> should contain only three elements.",
|
||||
"testString": "assert.equal(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]).length, 3, '<code>sym([1, 2, 5], [2, 3, 5], [3, 4, 5])</code> should contain only three elements.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])</code> should return <code>[1, 4, 5]</code>.",
|
||||
"testString": "assert.sameMembers(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], '<code>sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])</code> should return <code>[1, 4, 5]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])</code> should contain only three elements.",
|
||||
"testString": "assert.equal(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]).length, 3, '<code>sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])</code> should contain only three elements.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])</code> should return <code>[2, 3, 4, 6, 7]</code>.",
|
||||
"testString": "assert.sameMembers(sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3]), [2, 3, 4, 6, 7], '<code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])</code> should return <code>[2, 3, 4, 6, 7]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])</code> should contain only five elements.",
|
||||
"testString": "assert.equal(sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3]).length, 5, '<code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])</code> should contain only five elements.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])</code> should return <code>[1, 2, 4, 5, 6, 7, 8, 9]</code>.",
|
||||
"testString": "assert.sameMembers(sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1]), [1, 2, 4, 5, 6, 7, 8, 9], '<code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])</code> should return <code>[1, 2, 4, 5, 6, 7, 8, 9]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])</code> should contain only eight elements.",
|
||||
"testString": "assert.equal(sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1]).length, 8, '<code>sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])</code> should contain only eight elements.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
"MDNlinks": [
|
||||
"Array.prototype.reduce()",
|
||||
"Symmetric Difference"
|
||||
],
|
||||
"challengeType": 5,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Diferencia Simétrica",
|
||||
"description": [
|
||||
"Crea una función que acepte dos o más arreglos y que devuelva un arreglo conteniendo la diferenia simétrica entre ambos",
|
||||
"En Matemáticas, el término 'diferencia simétrica' se refiere a los elementos en dos conjuntos que están en el primer conjunto o en el segundo, pero no en ambos.",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> si te sientes atascado. Intenta programar en pareja. Escribe tu propio código."
|
||||
]
|
||||
},
|
||||
"it": {
|
||||
"title": "Differenza Simmetrica",
|
||||
"description": [
|
||||
"Crea una funzione che accetti due o più array e che ritorni un array contenente la <dfn>differenza simmetrica</dfn> (<code>△</code> o <code>⊕</code>) degli stessi.",
|
||||
"Dati due insiemi (per esempio l'insieme <code>A = {1, 2, 3}<code> e l'insieme <code>B = {2, 3, 4}</code>, il termine matematico \"differenza simmetrica\" di due insiemi è l'insieme degli elementi che sono in almeno uno dei due insiemi, ma non in entrambi (<code>A △ B = C = {1, 4}</code>). Per ogni differenza simmetrica aggiuntiva che fai (per esempio su un insieme <code>D = {2, 3}</code>), devi prendere l'insieme degli elementi che sono in almeno uno dei due insiemi ma non in entrambi (<code>C △ D = {1, 4} △ {2, 3} = {1, 2, 3, 4}</code>).",
|
||||
"Ricorda di usare <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Leggi-Cerca-Chiedi</a> se rimani bloccato. Prova a programmare in coppia. Scrivi il codice da te."
|
||||
]
|
||||
},
|
||||
"pt-br": {
|
||||
"title": "Diferença Simétrica",
|
||||
"description": [
|
||||
"Crie uma função que recebe duas ou mais matrizes e retorna a matriz <dfn>diferença simétrica</dfn> (<code>△</code> ou <code>⊕</code>) das matrizes fornecidas.",
|
||||
"Dado dois conjuntos (por exemplo conjunto <code>A = {1, 2, 3}</code> e conjunto <code>B = {2, 3, 4}</code>), o termo matemático \"diferença simétrica\" dos dois cojuntos é o conjunto dos elementos que estão em um dos conjuntos, mas não nos dois (<code>A △ B = C = {1, 4}</code>). Para cada diferença simétrica adicional que você faz (digamos em um terceiro conjunto <code>D = {2, 3}</code>), voce deve retornar o conjunto no qual os elementos estão em um dos conjuntos mas não nos dois (<code>C △ D = {1, 4} △ {2, 3} = {1, 2, 3, 4}</code>). O conjunto final deve ter somentes valores únicos (<em>sem números repetidos</em>).",
|
||||
"Lembre-se de usar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Ler-Procurar-Perguntar</a> se você ficar preso. Tente programar em par. Escreva seu próprio código."
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"indexjs": {
|
||||
"key": "indexjs",
|
||||
"ext": "js",
|
||||
"name": "index",
|
||||
"contents": [
|
||||
"function sym(args) {",
|
||||
" return args;",
|
||||
"}",
|
||||
"",
|
||||
"sym([1, 2, 3], [5, 2, 1, 4]);"
|
||||
],
|
||||
"head": "",
|
||||
"tail": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "a56138aff60341a09ed6c480",
|
||||
"title": "Inventory Update",
|
||||
"description": [
|
||||
"Compare and update the inventory stored in a 2D array against a second 2D array of a fresh delivery. Update the current existing inventory item quantities (in <code>arr1</code>). If an item cannot be found, add the new item and quantity into the inventory array. The returned inventory array should be in alphabetical order by item.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code."
|
||||
],
|
||||
"solutions": [
|
||||
"function updateInventory(arr1, arr2) {\n arr2.forEach(function(item) {\n createOrUpdate(arr1, item);\n });\n // All inventory must be accounted for or you're fired!\n return arr1;\n}\n\nfunction createOrUpdate(arr1, item) {\n var index = -1;\n while (++index < arr1.length) {\n if (arr1[index][1] === item[1]) {\n arr1[index][0] += item[0];\n return;\n }\n if (arr1[index][1] > item[1]) {\n break;\n }\n }\n arr1.splice(index, 0, item);\n}\n\n// Example inventory lists\nvar curInv = [\n [21, 'Bowling Ball'],\n [2, 'Dirty Sock'],\n [1, 'Hair Pin'],\n [5, 'Microphone']\n];\n\nvar newInv = [\n [2, 'Hair Pin'],\n [3, 'Half-Eaten Apple'],\n [67, 'Bowling Ball'],\n [7, 'Toothpaste']\n];\n\nupdateInventory(curInv, newInv);\n"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The function <code>updateInventory</code> should return an array.",
|
||||
"testString": "assert.isArray(updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]), 'The function <code>updateInventory</code> should return an array.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]])</code> should return an array with a length of 6.",
|
||||
"testString": "assert.equal(updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]).length, 6, '<code>updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]])</code> should return an array with a length of 6.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]])</code> should return <code>[[88, \"Bowling Ball\"], [2, \"Dirty Sock\"], [3, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [5, \"Microphone\"], [7, \"Toothpaste\"]]</code>.",
|
||||
"testString": "assert.deepEqual(updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]), [[88, \"Bowling Ball\"], [2, \"Dirty Sock\"], [3, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [5, \"Microphone\"], [7, \"Toothpaste\"]], '<code>updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]])</code> should return <code>[[88, \"Bowling Ball\"], [2, \"Dirty Sock\"], [3, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [5, \"Microphone\"], [7, \"Toothpaste\"]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [])</code> should return <code>[[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]]</code>.",
|
||||
"testString": "assert.deepEqual(updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], []), [[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], '<code>updateInventory([[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]], [])</code> should return <code>[[21, \"Bowling Ball\"], [2, \"Dirty Sock\"], [1, \"Hair Pin\"], [5, \"Microphone\"]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>updateInventory([], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]])</code> should return <code>[[67, \"Bowling Ball\"], [2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [7, \"Toothpaste\"]]</code>.",
|
||||
"testString": "assert.deepEqual(updateInventory([], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]]), [[67, \"Bowling Ball\"], [2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [7, \"Toothpaste\"]], '<code>updateInventory([], [[2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [67, \"Bowling Ball\"], [7, \"Toothpaste\"]])</code> should return <code>[[67, \"Bowling Ball\"], [2, \"Hair Pin\"], [3, \"Half-Eaten Apple\"], [7, \"Toothpaste\"]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>updateInventory([[0, \"Bowling Ball\"], [0, \"Dirty Sock\"], [0, \"Hair Pin\"], [0, \"Microphone\"]], [[1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [1, \"Bowling Ball\"], [1, \"Toothpaste\"]])</code> should return <code>[[1, \"Bowling Ball\"], [0, \"Dirty Sock\"], [1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [0, \"Microphone\"], [1, \"Toothpaste\"]]</code>.",
|
||||
"testString": "assert.deepEqual(updateInventory([[0, \"Bowling Ball\"], [0, \"Dirty Sock\"], [0, \"Hair Pin\"], [0, \"Microphone\"]], [[1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [1, \"Bowling Ball\"], [1, \"Toothpaste\"]]), [[1, \"Bowling Ball\"], [0, \"Dirty Sock\"], [1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [0, \"Microphone\"], [1, \"Toothpaste\"]], '<code>updateInventory([[0, \"Bowling Ball\"], [0, \"Dirty Sock\"], [0, \"Hair Pin\"], [0, \"Microphone\"]], [[1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [1, \"Bowling Ball\"], [1, \"Toothpaste\"]])</code> should return <code>[[1, \"Bowling Ball\"], [0, \"Dirty Sock\"], [1, \"Hair Pin\"], [1, \"Half-Eaten Apple\"], [0, \"Microphone\"], [1, \"Toothpaste\"]]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
"MDNlinks": [
|
||||
"Global Array Object"
|
||||
],
|
||||
"challengeType": 5,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Actualizando el Inventario",
|
||||
"description": [
|
||||
"Compara y actualiza el inventario actual, almacenado en un arreglo bidimensional, contra otro arreglo bidimensional de inventario nuevo. Actualiza las cantidades en el inventario actual y, en caso de recibir una nueva mercancía, añade su nombre y la cantidad recibida al arreglo del inventario en orden alfabético.",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> si te sientes atascado. Intenta programar en pareja. Escribe tu propio código."
|
||||
]
|
||||
},
|
||||
"it": {
|
||||
"title": "Aggiornamento dell'Inventario",
|
||||
"description": [
|
||||
"Confronta e aggiorna l'inventario, contenuto in un array bidimensionale, con un secondo array bidimensionale relativo ad una nuova consegna. Aggiorna le quantità disponibili in inventario (dentro <code>arr1</code>). Se uno degli articoli non è presente nell'inventario, aggiungi allo stesso il nuovo articolo e la sua quantità. Ritorna un array con l'inventario aggiornato, che deve essere ordinato alfabeticamente per articolo.",
|
||||
"Ricorda di usare <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Leggi-Cerca-Chiedi</a> se rimani bloccato. Prova a programmare in coppia. Scrivi il codice da te."
|
||||
]
|
||||
},
|
||||
"pt-br": {
|
||||
"title": "Atualizando Inventário",
|
||||
"description": [
|
||||
"Compare e atualize o inventário armazenado em um matriz 2D contra uma segunda matriz 2D de uma entrega recente. Atualize a quantidade de itens no inventário atual (em <code>arr1</code>). Se um item não pode ser encontrado, adicione um novo item e a sua quantidade na matriz do inventário. O inventário retornado deve estar em ordem alfabética por item.",
|
||||
"Lembre-se de usar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Ler-Procurar-Perguntar</a> se você ficar preso. Tente programar em par. Escreva seu próprio código."
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"indexjs": {
|
||||
"key": "indexjs",
|
||||
"ext": "js",
|
||||
"name": "index",
|
||||
"contents": [
|
||||
"function updateInventory(arr1, arr2) {",
|
||||
" // All inventory must be accounted for or you're fired!",
|
||||
" return arr1;",
|
||||
"}",
|
||||
"",
|
||||
"// Example inventory lists",
|
||||
"var curInv = [",
|
||||
" [21, \"Bowling Ball\"],",
|
||||
" [2, \"Dirty Sock\"],",
|
||||
" [1, \"Hair Pin\"],",
|
||||
" [5, \"Microphone\"]",
|
||||
"];",
|
||||
"",
|
||||
"var newInv = [",
|
||||
" [2, \"Hair Pin\"],",
|
||||
" [3, \"Half-Eaten Apple\"],",
|
||||
" [67, \"Bowling Ball\"],",
|
||||
" [7, \"Toothpaste\"]",
|
||||
"];",
|
||||
"",
|
||||
"updateInventory(curInv, newInv);"
|
||||
],
|
||||
"head": "",
|
||||
"tail": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "a7bf700cd123b9a54eef01d5",
|
||||
"title": "No Repeats Please",
|
||||
"description": [
|
||||
"Return the number of total permutations of the provided string that don't have repeated consecutive letters. Assume that all characters in the provided string are each unique.",
|
||||
"For example, <code>aab</code> should return 2 because it has 6 total permutations (<code>aab</code>, <code>aab</code>, <code>aba</code>, <code>aba</code>, <code>baa</code>, <code>baa</code>), but only 2 of them (<code>aba</code> and <code>aba</code>) don't have the same letter (in this case <code>a</code>) repeating.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code."
|
||||
],
|
||||
"solutions": [
|
||||
"function permAlone(str) {\n return permutor(str).filter(function(perm) {\n return !perm.match(/(.)\\1/g);\n }).length;\n}\n\nfunction permutor(str) {\n // http://staff.roguecc.edu/JMiller/JavaScript/permute.html\n //permArr: Global array which holds the list of permutations\n //usedChars: Global utility array which holds a list of \"currently-in-use\" characters\n var permArr = [], usedChars = [];\n function permute(input) {\n //convert input into a char array (one element for each character)\n var i, ch, chars = input.split(\"\");\n for (i = 0; i < chars.length; i++) {\n //get and remove character at index \"i\" from char array\n ch = chars.splice(i, 1);\n //add removed character to the end of used characters\n usedChars.push(ch);\n //when there are no more characters left in char array to add, add used chars to list of permutations\n if (chars.length === 0) permArr[permArr.length] = usedChars.join(\"\");\n //send characters (minus the removed one from above) from char array to be permuted\n permute(chars.join(\"\"));\n //add removed character back into char array in original position\n chars.splice(i, 0, ch);\n //remove the last character used off the end of used characters array\n usedChars.pop();\n }\n }\n permute(str);\n return permArr;\n}\n\npermAlone('aab');\n"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>permAlone(\"aab\")</code> should return a number.",
|
||||
"testString": "assert.isNumber(permAlone('aab'), '<code>permAlone(\"aab\")</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>permAlone(\"aab\")</code> should return 2.",
|
||||
"testString": "assert.strictEqual(permAlone('aab'), 2, '<code>permAlone(\"aab\")</code> should return 2.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>permAlone(\"aaa\")</code> should return 0.",
|
||||
"testString": "assert.strictEqual(permAlone('aaa'), 0, '<code>permAlone(\"aaa\")</code> should return 0.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>permAlone(\"aabb\")</code> should return 8.",
|
||||
"testString": "assert.strictEqual(permAlone('aabb'), 8, '<code>permAlone(\"aabb\")</code> should return 8.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>permAlone(\"abcdefa\")</code> should return 3600.",
|
||||
"testString": "assert.strictEqual(permAlone('abcdefa'), 3600, '<code>permAlone(\"abcdefa\")</code> should return 3600.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>permAlone(\"abfdefa\")</code> should return 2640.",
|
||||
"testString": "assert.strictEqual(permAlone('abfdefa'), 2640, '<code>permAlone(\"abfdefa\")</code> should return 2640.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>permAlone(\"zzzzzzzz\")</code> should return 0.",
|
||||
"testString": "assert.strictEqual(permAlone('zzzzzzzz'), 0, '<code>permAlone(\"zzzzzzzz\")</code> should return 0.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>permAlone(\"a\")</code> should return 1.",
|
||||
"testString": "assert.strictEqual(permAlone('a'), 1, '<code>permAlone(\"a\")</code> should return 1.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>permAlone(\"aaab\")</code> should return 0.",
|
||||
"testString": "assert.strictEqual(permAlone('aaab'), 0, '<code>permAlone(\"aaab\")</code> should return 0.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>permAlone(\"aaabb\")</code> should return 12.",
|
||||
"testString": "assert.strictEqual(permAlone('aaabb'), 12, '<code>permAlone(\"aaabb\")</code> should return 12.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
"MDNlinks": [
|
||||
"Permutations",
|
||||
"RegExp"
|
||||
],
|
||||
"challengeType": 5,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Sin Repeticiones, por Favor",
|
||||
"description": [
|
||||
"Crea una función que devuelva el número total de permutaciones de las letras en la cadena de texto provista, en las cuales no haya letras consecutivas repetidas",
|
||||
"Por ejemplo, 'aab' debe retornar 2 porque, del total de 6 permutaciones posibles, solo 2 de ellas no tienen repetida la misma letra (en este caso 'a').",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> si te sientes atascado. Intenta programar en pareja. Escribe tu propio código."
|
||||
]
|
||||
},
|
||||
"it": {
|
||||
"title": "Niente Ripetizioni, per Favore",
|
||||
"description": [
|
||||
"Ritorna il numero totale di permutazioni della stringa passata che non hanno lettere consecutive riptetute. Assumi che tutti i caratteri nella stringa passata siano unici.",
|
||||
"Per esempio, <code>aab</code> deve ritornare 2, perchè la stringa ha 6 permutazioni possibili in totale (<code>aab</code>, <code>aab</code>, <code>aba</code>, <code>aba</code>, <code>baa</code>, <code>baa</code>), ma solo 2 di loro (<code>aba</code> e <code>aba</code>) non contengono la stessa lettera (in questo caso <code>a</code> ripetuta).",
|
||||
"Ricorda di usare <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Leggi-Cerca-Chiedi</a> se rimani bloccato. Prova a programmare in coppia. Scrivi il codice da te."
|
||||
]
|
||||
},
|
||||
"pt-br": {
|
||||
"title": "Sem repetição, por favor",
|
||||
"description": [
|
||||
"Retorne o número total de permutações da string fornecida que não tem letras consecutivas repetidas. Assuma que todos os caracteres na string fornecida são únicos.",
|
||||
"Por exemplo, <code>aab</code> deve retornar 2 porque tem um total de 6 permutações (<code>aab</code>, <code>aab</code>, <code>aba</code>, <code>aba</code>, <code>baa</code>, <code>baa</code>), mas somente duas delas (<code>aba</code> and <code>aba</code>) não tem a mesma letra (nesse caso <code>a</code>) se repetindo.",
|
||||
"Lembre-se de usar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Ler-Procurar-Perguntar</a> se você ficar preso. Tente programar em par. Escreva seu próprio código."
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"indexjs": {
|
||||
"key": "indexjs",
|
||||
"ext": "js",
|
||||
"name": "index",
|
||||
"contents": [
|
||||
"function permAlone(str) {",
|
||||
" return str;",
|
||||
"}",
|
||||
"",
|
||||
"permAlone('aab');"
|
||||
],
|
||||
"head": "",
|
||||
"tail": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "a3f503de51cfab748ff001aa",
|
||||
"title": "Pairwise",
|
||||
"description": [
|
||||
"Given an array <code>arr</code>, find element pairs whose sum equal the second argument <code>arg</code> 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.",
|
||||
"For example <code>pairwise([7, 9, 11, 13, 15], 20)</code> returns <code>6</code>. The pairs that sum to 20 are <code>[7, 13]</code> and <code>[9, 11]</code>. We can then write out the array with their indices and values.",
|
||||
"<table class=\"table\"><tr><th><strong>Index</strong></th><th>0</th><th>1</th><th>2</th><th>3</th><th>4</th></tr><tr><td>Value</td><td>7</td><td>9</td><td>11</td><td>13</td><td>15</td></tr></table>",
|
||||
"Below we'll take their corresponding indices and add them.",
|
||||
"7 + 13 = 20 → Indices 0 + 3 = 3<br>9 + 11 = 20 → Indices 1 + 2 = 3<br>3 + 3 = 6 → Return <code>6</code>",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code."
|
||||
],
|
||||
"solutions": [
|
||||
"function pairwise(arr, arg) {\n var sum = 0;\n arr.forEach(function(e, i, a) {\n if (e != null) { \n var diff = arg-e;\n a[i] = null;\n var dix = a.indexOf(diff);\n if (dix !== -1) {\n sum += dix;\n sum += i;\n a[dix] = null;\n } \n }\n });\n return sum;\n}\n\npairwise([1,4,2,3,0,5], 7);\n"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>pairwise([1, 4, 2, 3, 0, 5], 7)</code> should return 11.",
|
||||
"testString": "assert.deepEqual(pairwise([1, 4, 2, 3, 0, 5], 7), 11, '<code>pairwise([1, 4, 2, 3, 0, 5], 7)</code> should return 11.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>pairwise([1, 3, 2, 4], 4)</code> should return 1.",
|
||||
"testString": "assert.deepEqual(pairwise([1, 3, 2, 4], 4), 1, '<code>pairwise([1, 3, 2, 4], 4)</code> should return 1.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>pairwise([1, 1, 1], 2)</code> should return 1.",
|
||||
"testString": "assert.deepEqual(pairwise([1, 1, 1], 2), 1, '<code>pairwise([1, 1, 1], 2)</code> should return 1.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>pairwise([0, 0, 0, 0, 1, 1], 1)</code> should return 10.",
|
||||
"testString": "assert.deepEqual(pairwise([0, 0, 0, 0, 1, 1], 1), 10, '<code>pairwise([0, 0, 0, 0, 1, 1], 1)</code> should return 10.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>pairwise([], 100)</code> should return 0.",
|
||||
"testString": "assert.deepEqual(pairwise([], 100), 0, '<code>pairwise([], 100)</code> should return 0.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
"MDNlinks": [
|
||||
"Array.prototype.reduce()"
|
||||
],
|
||||
"challengeType": 5,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "En Parejas",
|
||||
"description": [
|
||||
"Crea una función que devuelva la suma de todos los índices de los elementos de 'arr' que pueden ser emparejados con otro elemento de tal forma que la suma de ambos equivalga al valor del segundo argumento, 'arg'. Si varias combinaciones son posibles, devuelve la menor suma de índices. Una vez un elemento ha sido usado, no puede ser usado de nuevo para emparejarlo con otro elemento.",
|
||||
"Por ejemplo, pairwise([1, 4, 2, 3, 0, 5], 7) debe devolver 11 porque 4, 2, 3 y 5 pueden ser emparejados para obtener una suma de 7",
|
||||
"pairwise([1, 3, 2, 4], 4) devolvería el valor de 1, porque solo los primeros dos elementos pueden ser emparejados para sumar 4. ¡Recuerda que el primer elemento tiene un índice de 0!",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> si te sientes atascado. Intenta programar en pareja. Escribe tu propio código."
|
||||
]
|
||||
},
|
||||
"it": {
|
||||
"title": "A Coppie",
|
||||
"description": [
|
||||
"Dato un array <code>arr</code>, trova le coppie di elementi la cui somma è uguale al secondo argomento passato <code>arg</code>. Ritorna quindi la somma dei loro indici.",
|
||||
"Se ci sono più coppie possibili che hanno lo stesso valore numerico ma indici differenti, ritorna la somma degli indici minore. Una volta usato un elemento, lo stesso non può essere riutilizzato per essere accoppiato con un altro.",
|
||||
"Per esempio <code>pairwise([7, 9, 11, 13, 15], 20)</code> ritorna <code>6</code>. Le coppia la cui somma è 20 sono <code>[7, 13]</code> e <code>[9, 11]</code>. Possiamo quindi osservare l'array con i loro indici e valori.",
|
||||
"<table class=\"table\"><tr><th><strong>Indice</strong></th><th>0</th><th>1</th><th>2</th><th>3</th><th>4</th></tr><tr><td>Valore</td><td>7</td><td>9</td><td>11</td><td>13</td><td>15</td></tr></table>",
|
||||
"Qui sotto prendiamo gli indici corrispondenti e li sommiamo.",
|
||||
"7 + 13 = 20 → Indici 0 + 3 = 3<br>9 + 11 = 20 → Indici 1 + 2 = 3<br>3 + 3 = 6 → Ritorna <code>6</code>",
|
||||
"Ricorda di usare <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Leggi-Cerca-Chiedi</a> se rimani bloccato. Prova a programmare in coppia. Scrivi il codice da te."
|
||||
]
|
||||
},
|
||||
"pt-br": {
|
||||
"title": "Emparelhados",
|
||||
"description": [
|
||||
"Dado uma matriz <code>arr</code>, encontre pares de elementos no qual a soma é igual ao segundo argumento <code>arg</code> e retorne a soma dos seus indices.",
|
||||
"Se multiplos pares tem o mesmo elemento numérico mas indices diferentes, retorne a soma dos menores indices. Uma vez que um elemento é usado, este não pode ser emparelhado novamente com outro elemento.",
|
||||
"Por exemplo <code>pairwise([7, 9, 11, 13, 15], 20)</code> retorna <code>6</code>. Os pares que somam 20 são <code>[7, 13]</code> e <code>[9, 11]</code>. Nós podemos então criar a matriz com seus indices e valores.",
|
||||
"<table class=\"table\"><tr><th><strong>Index</strong></th><th>0</th><th>1</th><th>2</th><th>3</th><th>4</th></tr><tr><td>Value</td><td>7</td><td>9</td><td>11</td><td>13</td><td>15</td></tr></table>",
|
||||
"Abaixo nós pegamos os índices correspondentes e somá-los.",
|
||||
"7 + 13 = 20 → Indices 0 + 3 = 3<br>9 + 11 = 20 → Indices 1 + 2 = 3<br>3 + 3 = 6 → Retorna <code>6</code>",
|
||||
"Lembre-se de usar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Ler-Procurar-Perguntar</a> se você ficar preso. Tente programar em par. Escreva seu próprio código."
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"indexjs": {
|
||||
"key": "indexjs",
|
||||
"ext": "js",
|
||||
"name": "index",
|
||||
"contents": [
|
||||
"function pairwise(arr, arg) {",
|
||||
" return arg;",
|
||||
"}",
|
||||
"",
|
||||
"pairwise([1,4,2,3,0,5], 7);"
|
||||
],
|
||||
"head": "",
|
||||
"tail": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "8d5123c8c441eddfaeb5bdef",
|
||||
"title": "Implement Bubble Sort",
|
||||
"description": [
|
||||
"This is the first of several challenges on sorting algorithms. Given an array of unsorted items, we want to be able to return a sorted array. We will see several different methods to do this and learn some tradeoffs between these different approaches. While most modern languages have built-in sorting methods for operations like this, it is still important to understand some of the common basic approaches and learn how they can be implemented.",
|
||||
"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.",
|
||||
"<strong>Instructions:</strong> Write a function <code>bubbleSort</code> which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest.",
|
||||
"<strong>Note:</strong><br>We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging <code>array</code> to see your sorting alogrithm in action!"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>bubbleSort</code> is a function.",
|
||||
"testString": "assert(typeof bubbleSort == 'function', '<code>bubbleSort</code> is a function.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bubbleSort</code> returns a sorted array (least to greatest).",
|
||||
"testString": "assert(isSorted(bubbleSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])), '<code>bubbleSort</code> returns a sorted array (least to greatest).');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bubbleSort</code> returns an array that is unchanged except for order.",
|
||||
"testString": "assert.sameMembers(bubbleSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92]), [1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92], '<code>bubbleSort</code> returns an array that is unchanged except for order.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bubbleSort</code> should not use the built-in <code>.sort()</code> method.",
|
||||
"testString": "assert.strictEqual(code.search(/\\.sort\\(/), -1, '<code>bubbleSort</code> should not use the built-in <code>.sort()</code> method.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
"solutions": [],
|
||||
"challengeType": 1,
|
||||
"translations": {},
|
||||
"releasedOn": "February 17, 2017",
|
||||
"files": {
|
||||
"indexjs": {
|
||||
"key": "indexjs",
|
||||
"ext": "js",
|
||||
"name": "index",
|
||||
"contents": [
|
||||
"function bubbleSort(array) {",
|
||||
" // change code below this line",
|
||||
"",
|
||||
" // change code above this line",
|
||||
" return array;",
|
||||
"}",
|
||||
"",
|
||||
"// 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};"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "587d8259367417b2b2512c85",
|
||||
"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.",
|
||||
"<stong>Instructions</stong>: Write a function <code>selectionSort</code> which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest.",
|
||||
"<strong>Note:</strong><br>We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging <code>array</code> to see your sorting alogrithm in action!"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>selectionSort</code> is a function.",
|
||||
"testString": "assert(typeof selectionSort == 'function', '<code>selectionSort</code> is a function.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>selectionSort</code> returns a sorted array (least to greatest).",
|
||||
"testString": "assert(isSorted(selectionSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])), '<code>selectionSort</code> returns a sorted array (least to greatest).');"
|
||||
},
|
||||
{
|
||||
"text": "<code>selectionSort</code> returns an array that is unchanged except for order.",
|
||||
"testString": "assert.sameMembers(selectionSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92]), [1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92], '<code>selectionSort</code> returns an array that is unchanged except for order.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>selectionSort</code> should not use the built-in <code>.sort()</code> method.",
|
||||
"testString": "assert.strictEqual(code.search(/\\.sort\\(/), -1, '<code>selectionSort</code> should not use the built-in <code>.sort()</code> method.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
"solutions": [],
|
||||
"challengeType": 1,
|
||||
"translations": {},
|
||||
"releasedOn": "February 17, 2017",
|
||||
"files": {
|
||||
"indexjs": {
|
||||
"key": "indexjs",
|
||||
"ext": "js",
|
||||
"name": "index",
|
||||
"contents": [
|
||||
"function selectionSort(array) {",
|
||||
" // change code below this line",
|
||||
"",
|
||||
" // change code above this line",
|
||||
" return array;",
|
||||
"}",
|
||||
"",
|
||||
"// 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};"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "587d8259367417b2b2512c86",
|
||||
"title": "Implement Insertion Sort",
|
||||
"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.",
|
||||
"<strong>Instructions:</strong> Write a function <code>insertionSort</code> which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest.",
|
||||
"<strong>Note:</strong><br>We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging <code>array</code> to see your sorting alogrithm in action!"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>insertionSort</code> is a function.",
|
||||
"testString": "assert(typeof insertionSort == 'function', '<code>insertionSort</code> is a function.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>insertionSort</code> returns a sorted array (least to greatest).",
|
||||
"testString": "assert(isSorted(insertionSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])), '<code>insertionSort</code> returns a sorted array (least to greatest).');"
|
||||
},
|
||||
{
|
||||
"text": "<code>insertionSort</code> returns an array that is unchanged except for order.",
|
||||
"testString": "assert.sameMembers(insertionSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92]), [1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92], '<code>insertionSort</code> returns an array that is unchanged except for order.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>insertionSort</code> should not use the built-in <code>.sort()</code> method.",
|
||||
"testString": "assert.strictEqual(code.search(/\\.sort\\(/), -1, '<code>insertionSort</code> should not use the built-in <code>.sort()</code> method.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
"solutions": [],
|
||||
"challengeType": 1,
|
||||
"translations": {},
|
||||
"releasedOn": "February 17, 2017",
|
||||
"files": {
|
||||
"indexjs": {
|
||||
"key": "indexjs",
|
||||
"ext": "js",
|
||||
"name": "index",
|
||||
"contents": [
|
||||
"function insertionSort(array) {",
|
||||
" // change code below this line",
|
||||
"",
|
||||
" // change code above this line",
|
||||
" return array;",
|
||||
"}",
|
||||
"",
|
||||
"// 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};"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "587d825a367417b2b2512c89",
|
||||
"title": "Implement Quick Sort",
|
||||
"description": [
|
||||
"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 <i>O(nlog(n))</i> performance on average. It is also relatively easy to implement. These attributes make it a popular and useful sorting method.",
|
||||
"<strong>Instructions:</strong> Write a function <code>quickSort</code> 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.",
|
||||
"<strong>Note:</strong><br>We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging <code>array</code> to see your sorting alogrithm in action!"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>quickSort</code> is a function.",
|
||||
"testString": "assert(typeof quickSort == 'function', '<code>quickSort</code> is a function.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>quickSort</code> returns a sorted array (least to greatest).",
|
||||
"testString": "assert(isSorted(quickSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])), '<code>quickSort</code> returns a sorted array (least to greatest).');"
|
||||
},
|
||||
{
|
||||
"text": "<code>quickSort</code> returns an array that is unchanged except for order.",
|
||||
"testString": "assert.sameMembers(quickSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92]), [1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92], '<code>quickSort</code> returns an array that is unchanged except for order.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>quickSort</code> should not use the built-in <code>.sort()</code> method.",
|
||||
"testString": "assert.strictEqual(code.search(/\\.sort\\(/), -1, '<code>quickSort</code> should not use the built-in <code>.sort()</code> method.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
"solutions": [],
|
||||
"challengeType": 1,
|
||||
"translations": {},
|
||||
"releasedOn": "February 17, 2017",
|
||||
"files": {
|
||||
"indexjs": {
|
||||
"key": "indexjs",
|
||||
"ext": "js",
|
||||
"name": "index",
|
||||
"contents": [
|
||||
"function quickSort(array) {",
|
||||
" // change code below this line",
|
||||
"",
|
||||
" // change code above this line",
|
||||
" return array;",
|
||||
"}",
|
||||
"",
|
||||
"// 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};"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "587d825c367417b2b2512c8f",
|
||||
"title": "Implement Merge Sort",
|
||||
"description": [
|
||||
"Another intermediate sorting algorithm that is very common is merge sort. Like quick sort, merge sort also uses a divide-and-conquer, recursive methodology to sort an array. It takes advantage of the fact that it is relatively easy to sort two arrays as long as each is sorted in the first place. But we'll start with only one array as input, so how do we get to two sorted arrays from that? Well, we can recursively divide the original input in two until we reach the base case of an array with one item. A single-item array is naturally sorted, so then we can start combining. This combination will unwind the recursive calls that split the original array, eventually producing a final sorted array of all the elements. The steps of merge sort, then, are:",
|
||||
"<strong>1)</strong> Recursively split the input array in half until a sub-array with only one element is produced.",
|
||||
"<strong>2)</strong> Merge each sorted sub-array together to produce the final sorted array.",
|
||||
"Merge sort is an efficient sorting method, with time complexity of <i>O(nlog(n))</i>. 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.",
|
||||
"<strong>Instructions:</strong> Write a function <code>mergeSort</code> 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 <code>merge</code>, which is responsible for merging two sorted arrays, and another function, for instance <code>mergeSort</code>, which is responsible for the recursion that produces single-item arrays to feed into merge. Good luck!",
|
||||
"<strong>Note:</strong><br>We are calling this function from behind the scenes; the test array we are using is commented out in the editor. Try logging <code>array</code> to see your sorting alogrithm in action!"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>mergeSort</code> is a function.",
|
||||
"testString": "assert(typeof mergeSort == 'function', '<code>mergeSort</code> is a function.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mergeSort</code> returns a sorted array (least to greatest).",
|
||||
"testString": "assert(isSorted(mergeSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])), '<code>mergeSort</code> returns a sorted array (least to greatest).');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mergeSort</code> returns an array that is unchanged except for order.",
|
||||
"testString": "assert.sameMembers(mergeSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92]), [1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92], '<code>mergeSort</code> returns an array that is unchanged except for order.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mergeSort</code> should not use the built-in <code>.sort()</code> method.",
|
||||
"testString": "assert.strictEqual(code.search(/\\.sort\\(/), -1, '<code>mergeSort</code> should not use the built-in <code>.sort()</code> method.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
"solutions": [],
|
||||
"challengeType": 1,
|
||||
"translations": {},
|
||||
"releasedOn": "February 17, 2017",
|
||||
"files": {
|
||||
"indexjs": {
|
||||
"key": "indexjs",
|
||||
"ext": "js",
|
||||
"name": "index",
|
||||
"contents": [
|
||||
"function mergeSort(array) {",
|
||||
" // change code below this line",
|
||||
"",
|
||||
" // change code above this line",
|
||||
" return array;",
|
||||
"}",
|
||||
"",
|
||||
"// 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};"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"fileName": "08-coding-interview-questions-and-take-home-assignments/coding-interview-algorithm-questions.json",
|
||||
"superBlock": "coding-interview-questions-and-take-home-assignments",
|
||||
"superOrder": 8
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,876 @@
|
||||
{
|
||||
"name": "Take Home Projects",
|
||||
"order": 4,
|
||||
"time": "",
|
||||
"helpRoom": "HelpFrontEnd",
|
||||
"challenges": [
|
||||
{
|
||||
"id": "bd7158d8c442eddfaeb5bd10",
|
||||
"title": "Show the Local Weather",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/bELRjV' target='_blank'>https://codepen.io/freeCodeCamp/full/bELRjV</a>.",
|
||||
"<strong>Rule #1:</strong> Don't look at the example project's code. Figure it out for yourself.",
|
||||
"<strong>Rule #2:</strong> Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can see the weather in my current location.",
|
||||
"<strong>User Story:</strong> I can see a different icon or background image (e.g. snowy mountain, hot desert) depending on the weather.",
|
||||
"<strong>User Story:</strong> I can push a button to toggle between Fahrenheit and Celsius.",
|
||||
"<strong>Note:</strong> Many internet browsers now require an HTTP Secure (<code>https://</code>) connection to obtain a user's locale via HTML5 Geolocation. For this reason, we recommend using HTML5 Geolocation to get user location and then use the freeCodeCamp Weather API <a href='https://fcc-weather-api.glitch.me' target='_blank'>https://fcc-weather-api.glitch.me</a> which uses an HTTP Secure connection for the weather. Also, be sure to connect to <a href='https://codepen.io' target='_blank'>CodePen.io</a> via <code>https://</code>.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"isRequired": false,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Muestra el clima local",
|
||||
"description": [
|
||||
"<span class='text-info'>Objetivo:</span> Crea una aplicación con <a href='https://codepen.io' target='_blank'>CodePen.io</a> cuya funcionalidad sea similar a la de esta: <a href='https://codepen.io/freeCodeCamp/full/bELRjV' target='_blank'>https://codepen.io/freeCodeCamp/full/bELRjV</a>.",
|
||||
"Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o APIs que necesites.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Pedo obtener información acerca del clima en mi localización actual.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo ver un icono diferente o una imagen de fondo diferente (e.g. montaña con nieve, desierto caliente) dependiendo del clima.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo pulsar un botón para cambiar la unidad de temperatura de grados Fahrenheit a Celsius y viceversa.",
|
||||
"Recomendamos utilizar <a href='https://openweathermap.org/current#geo' target='_blank'>Open Weather API</a>. Al utilizarlo tendrás que crear una llave API gratuita. Normalmente debes evitar exponer llaves de API en CodePen, pero por el momento no hemos encontrado un API de clima que no requiera llave.",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Leer-Buscar-Preguntar</a> si te sientes atascado.",
|
||||
"Cuando hayas terminado, pulsa el botón de \"I've completed this challenge\" e incluye un enlace a tu CodePen.",
|
||||
"Puedes obtener retroalimentación sobre tu proyecto por parte de otros campistas, compartiendolo en nuestra <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Sala de chat para revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
},
|
||||
"ru": {
|
||||
"title": "Покажите местную погоду",
|
||||
"description": [
|
||||
"<span class='text-info'>Задание:</span> Создайте <a href='https://codepen.io' target='_blank'>CodePen.io</a> который успешно копирует вот этот: <a href='https://codepen.io/freeCodeCamp/full/bELRjV' target='_blank'>https://codepen.io/freeCodeCamp/full/bELRjV</a>.",
|
||||
"<span class='text-info'>Правило #1:</span> Не подсматривайте код приведенного на CodePen примера. Напишите его самостоятельно.",
|
||||
"<span class='text-info'>Правило #2:</span> Можете использовать любые библиотеки или API, которые потребуются.",
|
||||
"<span class='text-info'>Правило #3:</span> Воссоздайте функционал приведенного примера и не стесняйтесь добавить что-нибудь от себя.",
|
||||
"Реализуйте следующие <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>пользовательские истории</a>, сделайте также бонусные по желанию:",
|
||||
"<span class='text-info'>Пользовательская история:</span> В качестве пользователя, я могу узнать погоду с учетом моего текущего местоположения.",
|
||||
"<span class='text-info'>Бонусная пользовательская история:</span> В качестве пользователя, я могу в зависимости от погоды видеть различные температурные значки.",
|
||||
"<span class='text-info'>Бонусная пользовательская история:</span> В качестве пользователя, я могу в зависимости от погоды видеть различные фоновые изображения (снежные горы, знойная пустыня).",
|
||||
"<span class='text-info'>Бонусная пользовательская история:</span> В качестве пользователя, я могу нажать на кнопку чтобы переключится между градусами по Цельсию или по Фаренгейту.",
|
||||
"Если что-то не получается, воспользуйтесь <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a>.",
|
||||
"Когда выполните задание кликните кнопку \"I've completed this challenge\" и добавьте ссылку на ваш CodePen. Если вы программировали с кем-то в паре, также добавьте имя вашего напарника.",
|
||||
"Если вы хотите получить немедленную оценку вашего проекта, нажмите эту кнопку и добавьте ссылку на ваш CodePen. В противном случае мы проверим его перед тем как вы приступите к проектам для некоммерческих организаций.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c442eddfaeb5bd19",
|
||||
"title": "Build a Wikipedia Viewer",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/wGqEga/' target='_blank'>https://codepen.io/freeCodeCamp/full/wGqEga/</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can search Wikipedia entries in a search box and see the resulting Wikipedia entries.",
|
||||
"<strong>User Story:</strong> I can click a button to see a random Wikipedia entry.",
|
||||
"<span class='text-info'>Hint #1:</span> Here's a URL you can use to get a random Wikipedia article: <code>https://en.wikipedia.org/wiki/Special:Random</code>.",
|
||||
"<span class='text-info'>Hint #2:</span> Here's an entry on using Wikipedia's API: <code>https://www.mediawiki.org/wiki/API:Main_page</code>.",
|
||||
"<span class='text-info'>Hint #3:</span> Use this <a href='https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&titles=Main%20Page&prop=revisions&rvprop=content&format=jsonfm' target='_blank'>link</a> to experiment with Wikipedia's API.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"isRequired": false,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Crea un buscador de Wikipedia",
|
||||
"description": [
|
||||
"<span class='text-info'>Objetivo:</span> Crea una aplicación con <a href='https://codepen.io' target='_blank'>CodePen.io</a> cuya funcionalidad sea similar a la de esta: <a href='https://codepen.io/freeCodeCamp/full/wGqEga/' target='_blank'>https://codepen.io/freeCodeCamp/full/wGqEga/</a>.",
|
||||
"Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o APIs que necesites. Dale tu estilo personal.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Pedo obtener información acerca del clima en mi localización actual.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo ver un icono diferente o una imagen de fondo diferente (e.g. montaña con nieve, desierto caliente) dependiendo del clima.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo pulsar un botón para cambiar la unidad de temperatura de grados Fahrenheit a Celsius y viceversa.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo buscar entradas en Wikipedia en un cuadro de búsqueda y ver las entradas de Wikipedia resultantes.",
|
||||
"<span class='text-info'>Historia de usuario:</span>Puedo pulsar un botón para ver un artículo aleatorio de Wikipedia.",
|
||||
"<span class='text-info'>Pista 1:</span> Aquí está una URL donde puedes ver una entrada aleatoria de Wikipedia: <code>https://en.wikipedia.org/wiki/Special:Random<</code>.",
|
||||
"<span class='text-info'>Pista 2:</span> Este es un artículo muy útil relativo al uso del API de Wikipedia: <code>https://www.mediawiki.org/wiki/API:Main_page</code>.",
|
||||
"<span class='text-info'>Pista 3:</span> Usa este <a href='https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&titles=Main%20Page&prop=revisions&rvprop=content&format=jsonfm' target='_blank'>enlace</a> para experimentar con el API de Wikipedia.",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Leer-Buscar-Preguntar</a> si te sientes atascado.",
|
||||
"Cuando hayas terminado, pulsa el botón de \"I've completed this challenge\" e incluye un enlace a tu CodePen.",
|
||||
"Puedes obtener retroalimentación sobre tu proyecto por parte de otros campistas, compartiendolo en nuestra <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Sala de chat para revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c442eddfaeb5bd1f",
|
||||
"title": "Use the Twitch JSON API",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/Myvqmo/' target='_blank'>https://codepen.io/freeCodeCamp/full/Myvqmo/</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can see whether freeCodeCamp is currently streaming on Twitch.tv.",
|
||||
"<strong>User Story:</strong> I can click the status output and be sent directly to the freeCodeCamp's Twitch.tv channel.",
|
||||
"<strong>User Story:</strong> if a Twitch user is currently streaming, I can see additional details about what they are streaming.",
|
||||
"<strong>Hint:</strong> See an example call to Twitch.tv's JSONP API at <a href='http://forum.freecodecamp.org/t/use-the-twitchtv-json-api/19541' target='_blank'>http://forum.freecodecamp.org/t/use-the-twitchtv-json-api/19541</a>.",
|
||||
"<strong>Hint:</strong> The relevant documentation about this API call is here: <a href='https://dev.twitch.tv/docs/v5/reference/streams/#get-stream-by-user' target='_blank'>https://dev.twitch.tv/docs/v5/reference/streams/#get-stream-by-user</a>.",
|
||||
"<strong>Hint:</strong> Here's an array of the Twitch.tv usernames of people who regularly stream: <code>[\"ESL_SC2\", \"OgamingSC2\", \"cretetion\", \"freecodecamp\", \"storbeck\", \"habathcx\", \"RobotCaleb\", \"noobs2ninjas\"]</code>",
|
||||
"<strong>UPDATE:</strong> Due to a change in conditions on API usage explained <a href='https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843#.f8hipkht1' target='_blank'>here</a> Twitch.tv now requires an API key, but we've built a workaround. Use <a href='https://wind-bow.glitch.me' target='_blank'>https://wind-bow.glitch.me/twitch-api</a> instead of twitch's API base URL (i.e. https://api.twitch.tv/kraken ) and you'll still be able to get account information, without needing to sign up for an API key.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"isRequired": false,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Usa el API JSON de Twitch",
|
||||
"description": [
|
||||
"<span class='text-info'>Objetivo:</span> Crea una aplicación con <a href='https://codepen.io' target='_blank'>CodePen.io</a> cuya funcionalidad sea similar a la de esta: <a href='https://codepen.io/freeCodeCamp/full/Myvqmo/' target='_blank'>https://codepen.io/freeCodeCamp/full/Myvqmo/</a>.",
|
||||
"Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o APIs que necesites. Dale tu estilo personal.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo verificar si freeCodeCamp está transmitiendo actualmente en Twitch.tv",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo pulsar el estatus y ser enviado directamente al canal de freeCodeCamp en Twitch.tv.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Si un usuario Twitch está transmitiendo actualmente, puedo ver detalles adicionales acerca del contenido que están transmitiendo.",
|
||||
"<span class='text-info'>Pista:</span> Obseva una llamada de ejemplo al API JSONP de Twitch.tv en <code>http://forum.freecodecamp.org/t/use-the-twitchtv-json-api/19541</code>.",
|
||||
"<span class='text-info'>Pista:</span> La documentación relevante sobre esta llamada al API está aquí: <a href='https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel' target='_blank'>https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel</a>.",
|
||||
"<span class='text-info'>Pista:</span> Aquí está un vector de usuarios en Twitch.tv que regularmente transmiten sobre programación: <code>[\"ESL_SC2\", \"OgamingSC2\", \"cretetion\", \"freecodecamp\", \"storbeck\", \"habathcx\", \"RobotCaleb\", \"noobs2ninjas\"]</code>",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Leer-Buscar-Preguntar</a> si te sientes atascado.",
|
||||
"Cuando hayas terminado, pulsa el botón de \"I've completed this challenge\" e incluye un enlace a tu CodePen.",
|
||||
"Puedes obtener retroalimentación sobre tu proyecto por parte de otros campistas, compartiendolo en nuestra <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Sala de chat para revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
},
|
||||
"ru": {
|
||||
"title": "Используйте Twitch JSON API",
|
||||
"description": [
|
||||
"<span class='text-info'>Задание:</span> Создайте <a href='https://codepen.io' target='_blank'>CodePen.io</a> который успешно копирует вот этот: <a href='https://codepen.io/freeCodeCamp/full/Myvqmo/' target='_blank'>https://codepen.io/freeCodeCamp/full/Myvqmo/</a>.",
|
||||
"<span class='text-info'>Правило #1:</span> Не подсматривайте код приведенного на CodePen примера. Напишите его самостоятельно.",
|
||||
"<span class='text-info'>Правило #2:</span> Можете использовать любые библиотеки или API, которые потребуются.",
|
||||
"<span class='text-info'>Правило #3:</span> Воссоздайте функционал приведенного примера и не стесняйтесь добавить что-нибудь от себя.",
|
||||
"Реализуйте следующие <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>пользовательские истории</a>, сделайте также бонусные по желанию:",
|
||||
"<span class='text-info'>Пользовательская история:</span> В качестве пользователя, я могу увидеть идет ли в данный момент на Twitch.tv трансляция freeCodeCamp.",
|
||||
"<span class='text-info'>Пользовательская история:</span> В качестве пользователя, я могу, кликнув на описание трансляции, перейти на канал freeCodeCamp.",
|
||||
"<span class='text-info'>Пользовательская история:</span> В качестве пользователя, я могу видеть дополнительную информацию о текущей трансляции freeCodeCamp.",
|
||||
"<span class='text-info'>Бонусная пользовательская история:</span> В качестве пользователя, я могу произвести поиск среди перечисленных каналов.",
|
||||
"<span class='text-info'>Подсказка:</span> Пример запроса к Twitch.tv JSON API: <code>https://api.twitch.tv/kraken/streams/freecodecamp</code>.",
|
||||
"<span class='text-info'>Подсказка:</span> Документацию об этом запросе можно найти по ссылке: <a href='https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel' target='_blank'>https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel</a>.",
|
||||
"<span class='text-info'>Подсказка:</span> В этом массиве приведены имена пользователей, которые регулярно пишут код онлайн: <code>[\"ESL_SC2\", \"OgamingSC2\", \"cretetion\", \"freecodecamp\", \"storbeck\", \"habathcx\", \"RobotCaleb\", \"noobs2ninjas\"]</code>",
|
||||
"Если что-то не получается, воспользуйтесь <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a>.",
|
||||
"Когда выполните задание кликните кнопку \"I've completed this challenge\" и добавьте ссылку на ваш CodePen. Если вы программировали с кем-то в паре, также добавьте имя вашего напарника.",
|
||||
"Если вы хотите получить немедленную оценку вашего проекта, нажмите эту кнопку и добавьте ссылку на ваш CodePen. В противном случае мы проверим его перед тем как вы приступите к проектам для некоммерческих организаций.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c443edefaeb5bdee",
|
||||
"title": "Build an Image Search Abstraction Layer",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a full stack JavaScript app that allows you to search for images like this: <a href='https://cryptic-ridge-9197.herokuapp.com/api/imagesearch/lolcats%20funny?offset=10' target='_blank'>https://cryptic-ridge-9197.herokuapp.com/api/imagesearch/lolcats%20funny?offset=10</a> and browse recent search queries like this: <a href='https://cryptic-ridge-9197.herokuapp.com/api/latest/imagesearch/' target='_blank'>https://cryptic-ridge-9197.herokuapp.com/api/latest/imagesearch/</a>. Then deploy it to Glitch.",
|
||||
"Note that for each project, you should create a new GitHub repository and a new Glitch project. If you can't remember how to do this, revisit <a href='/challenges/get-set-for-our-api-development-projects'>https://freecodecamp.org/challenges/get-set-for-our-api-development-projects</a>.",
|
||||
"Here are the specific user stories you should implement for this project:",
|
||||
"<strong>User Story:</strong> I can get the image URLs, alt text and page urls for a set of images relating to a given search string.",
|
||||
"<strong>User Story:</strong> I can paginate through the responses by adding a ?offset=2 parameter to the URL.",
|
||||
"<strong>User Story:</strong> I can get a list of the most recently submitted search strings.",
|
||||
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Glitch.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"isRequired": true,
|
||||
"releasedOn": "January 1, 2016",
|
||||
"type": "basejump",
|
||||
"challengeType": 4,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Capa de abstracción para buscar imágenes",
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Desarolla una aplicación de Pila Completa en JavaScript que te permite buscar imágenes como esta: <a href='https://cryptic-ridge-9197.herokuapp.com/api/imagesearch/lolcats%20funny?offset=10' target='_blank'>https://cryptic-ridge-9197.herokuapp.com/api/imagesearch/lolcats%20funny?offset=10</a> y examinar las búsquedas recientes como esta: <a href='https://cryptic-ridge-9197.herokuapp.com/api/latest/imagesearch/' target='_blank'>https://cryptic-ridge-9197.herokuapp.com/api/latest/imagesearch/</a>. Después, despliegala en Glitch.",
|
||||
"Ten en cuenta que para cada proyecto, deberías crear un nuevo repositorio en GitHub y un nuevo proyecto en Glitch. Si no recuerdas como hacer esto, vuelve a visitar <a href='/challenges/get-set-for-our-api-development-projects'>https://freecodecamp.org//challenges/get-set-for-our-api-development-projects</a>.",
|
||||
"Aquí están las historias de usuario específicas que debes implementar para este proyecto:",
|
||||
"<strong>Historia de Usuario:</strong> Puedo obtener la URL de una imagen, texto alternativo y URLs de las páginas de un conjunto de imágenes que se relacionen con una cadena de texto dada.",
|
||||
"<strong>Historia de Usuario:</strong> Puedo examinar página a página las respuestas añadiendo un parámetro del estilo <code>?offset=2</code> al URL.",
|
||||
"<strong>Historia de Usuario:</strong> Puedo obtener una lista de las cadenas búscadas que se enviaron más recientemente.",
|
||||
"Una vez que hayas terminado de implementar estas historias de usuarios, pulsa el botón \"I've completed this challenge\" e introduce los URLs de tu repositorio en GitHub y de tu aplicación en vivo en Glitch.",
|
||||
"Puedes obtener retroalimentación sobre tu proyecto por parte de otros campistas, compartiendolo en nuestra <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Sala de chat para revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c442eedfaeb5bd1c",
|
||||
"title": "Build a Tic Tac Toe Game",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/KzXQgy/' target='_blank'>https://codepen.io/freeCodeCamp/full/KzXQgy/</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can play a game of Tic Tac Toe with the computer.",
|
||||
"<strong>User Story:</strong> My game will reset as soon as it's over so I can play again.",
|
||||
"<strong>User Story:</strong> I can choose whether I want to play as X or O.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"isRequired": false,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Crea un juego de Tic Tac Toe",
|
||||
"description": [
|
||||
"<span class='text-info'>Objetivo:</span> Construye una aplicación en <a href='https://codepen.io' target='_blank'>CodePen.io</a> cuya funcionalidad sea similar a la de esta: <a href='https://codepen.io/freeCodeCamp/full/KzXQgy/' target='_blank'>https://codepen.io/freeCodeCamp/full/KzXQgy/</a>.",
|
||||
"Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o APIs que necesites. Dale tu estilo personal.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo jugar un juego de Tic Tac Toe contra el computador.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Mi juego se reiniciará tan pronto como termine para poder jugar de nuevo.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo elegir si quiero jugar como X o como O.",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Leer-Buscar-Preguntar</a> si te sientes atascado.",
|
||||
"Cuando hayas terminado, pulsa el botón de \"I've completed this challenge\" e incluye un enlace a tu CodePen.",
|
||||
"Puedes obtener retroalimentación sobre tu proyecto por parte de otros campistas, compartiéndolo en nuestra <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Sala de chat para revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c442eddfaeb5bd1c",
|
||||
"title": "Build a Simon Game",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/Em-Ant/full/QbRyqq/' target='_blank'>https://codepen.io/freeCodeCamp/full/obYBjE</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I am presented with a random series of button presses.",
|
||||
"<strong>User Story:</strong> Each time I input a series of button presses correctly, I see the same series of button presses but with an additional step.",
|
||||
"<strong>User Story:</strong> I hear a sound that corresponds to each button both when the series of button presses plays, and when I personally press a button.",
|
||||
"<strong>User Story:</strong> If I press the wrong button, I am notified that I have done so, and that series of button presses starts again to remind me of the pattern so I can try again.",
|
||||
"<strong>User Story:</strong> I can see how many steps are in the current series of button presses.",
|
||||
"<strong>User Story:</strong> If I want to restart, I can hit a button to do so, and the game will return to a single step.",
|
||||
"<strong>User Story:</strong> I can play in strict mode where if I get a button press wrong, it notifies me that I have done so, and the game restarts at a new random series of button presses.",
|
||||
"<strong>User Story:</strong> I can win the game by getting a series of 20 steps correct. I am notified of my victory, then the game starts over.",
|
||||
"<strong>Hint:</strong> Here are mp3s you can use for each button: <code>https://s3.amazonaws.com/freecodecamp/simonSound1.mp3</code>, <code>https://s3.amazonaws.com/freecodecamp/simonSound2.mp3</code>, <code>https://s3.amazonaws.com/freecodecamp/simonSound3.mp3</code>, <code>https://s3.amazonaws.com/freecodecamp/simonSound4.mp3</code>.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"isRequired": false,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Construye un juego de Simon",
|
||||
"description": [
|
||||
"<span class='text-info'>Objetivo:</span> Construye una aplicación en <a href='https://codepen.io' target='_blank'>CodePen.io</a> cuya funcionalidad sea similar a la de esta: <a href='https://codepen.io/Em-Ant/full/QbRyqq/' target='_blank'>https://codepen.io/Em-Ant/full/QbRyqq/</a>.",
|
||||
"Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o APIs que necesites. Dale tu estilo personal.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Se me presenta una serie aleatoria de pulsaciones a botones.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Cada vez que presiono una secuencia de pulsaciones correctamente, veo que vuelve a ejecutarse la misma serie de pulsaciones con un paso adicional.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Escucho un sonido que corresponde a cada botón cuando se ejecuta una secuencia de pulsaciones, así como cuando yo presiono un botón.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Si presiono el botón equivocado, se me notifica sobre mi error, y se ejecuta de nuevo la serie correcta de pulsaciones para recordarme cuál es la secuencia correcta, tras lo cual puedo intentar de nuevo.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo ver cuántos pasos hay en la serie de pulsaciones actual.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Si deseo reiniciar, puedo pulsar un botón para hacerlo, y el juego comenzará desde una secuencia con un solo paso.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo jugar en modo estricto donde si presiono el botón equivocado, se me notifica de mi error, y el juego vuelve a comenzar con una nueva serie aleatoria de colores.",
|
||||
"<span class='text-info'>Historia de usuario:</span> Puedo ganar el juego si completo 20 pasos correctos. Se me notifica sobre mi victoria, tras lo cual el juego se reinicia.",
|
||||
"<span class='text-info'>Pista:</span> Aquí hay algunos mp3s que puedes utilizar para tus botones: <code>https://s3.amazonaws.com/freecodecamp/simonSound1.mp3</code>, <code>https://s3.amazonaws.com/freecodecamp/simonSound2.mp3</code>, <code>https://s3.amazonaws.com/freecodecamp/simonSound3.mp3</code>, <code>https://s3.amazonaws.com/freecodecamp/simonSound4.mp3</code>.",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Leer-Buscar-Preguntar</a> si te sientes atascado.",
|
||||
"Cuando hayas terminado, pulsa el botón de \"I've completed this challenge\" e incluye un enlace a tu CodePen.",
|
||||
"Puedes obtener retroalimentación sobre tu proyecto por parte de otros campistas, compartiéndolo en nuestra <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Sala de chat para revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7156d8c242eddfaeb5bd13",
|
||||
"title": "Build a Camper Leaderboard",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/eZGMjp/' target='_blank'>https://codepen.io/freeCodeCamp/full/eZGMjp/</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can see a table of the freeCodeCamp campers who've earned the most brownie points in the past 30 days.",
|
||||
"<strong>User Story:</strong> I can see how many brownie points they've earned in the past 30 days, and how many they've earned total.",
|
||||
"<strong>User Story:</strong> I can toggle between sorting the list by how many brownie points they've earned in the past 30 days and by how many brownie points they've earned total.",
|
||||
"<strong>Hint:</strong> To get the top 100 campers for the last 30 days: <a href='https://fcctop100.herokuapp.com/api/fccusers/top/recent' target='_blank'>https://fcctop100.herokuapp.com/api/fccusers/top/recent</a>.",
|
||||
"<strong>Hint:</strong> To get the top 100 campers of all time: <a href='https://fcctop100.herokuapp.com/api/fccusers/top/alltime' target='_blank'>https://fcctop100.herokuapp.com/api/fccusers/top/alltime</a>.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. ",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"releasedOn": "January 1, 2016",
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"isRequired": false,
|
||||
"challengeType": 3,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Crea un marcador para los campistas",
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación en <a href='https://codepen.io' target='_blank'>CodePen.io</a> que funcione de forma similar al siguiente ejemplo: <a href='https://codepen.io/freeCodeCamp/full/eZGMjp/' target='_blank'>https://codepen.io/freeCodeCamp/full/eZGMjp/</a>.",
|
||||
"Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o API que sea necesaria. ¡Ponle un toque personal!.",
|
||||
"<strong>Historia de usuario:</strong> Puedo ver un tablero con los campistas de freeCodeCamp que han ganado más puntos de brownie en los últimos 30 días.",
|
||||
"<strong>Historia de usuario:</strong> Puedo ver cuántos puntos de brownie han ganado en los últimos 30 días, y cuántos han ganado en total.",
|
||||
"<strong>Historia de usuario:</strong> Puedo elegir entre dos formas de organizar la lista: 1) En base a cuántos puntos de brownie se han ganado en los últimos 30 días. 2) En base al número de puntos de brownie que han ganado en total.",
|
||||
"<strong>Pista:</strong> Para obtener los 100 mejores campistas para los últimos 30 días: <a href='https://fcctop100.herokuapp.com/api/fccusers/top/recent' target='_blank'>https://fcctop100.herokuapp.com/api/fccusers/top/recent</a>.",
|
||||
"<strong>Pista:</strong> Para obtener los 100 mejores campistas de toda la historia: <a href='http://fcctop100.herokuapp.com/api/fccusers/top/alltime' target='_blank'>http://fcctop100.herokuapp.com/api/fccusers/top/alltime</a>.",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> si te sientes atascado.",
|
||||
"Cuando termines, haz clic en el botón de \"I've completed this challenge\" e incluye el vínculo de tu proyecto en CodePen. ",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
},
|
||||
"ru": {
|
||||
"title": "Создайте таблицу Кемперов-Лидеров",
|
||||
"description": [
|
||||
"<strong>Задание:</strong> Создайте приложение <a href='https://codepen.io' target='_blank'>CodePen.io</a>, функционал которого схож с этим: <a href='https://codepen.io/freeCodeCamp/full/eZGMjp/' target='_blank'>https://codepen.io/freeCodeCamp/full/eZGMjp/</a>.",
|
||||
"Приложение должно удовлетворять нижеприведённым <a href='https://ru.wikipedia.org/wiki/Пользовательские_истории' target='_blank'>пользовательским историям</a>. Используйте любые библиотеки или API, которые потребуются. Придайте ему свой личный стиль.",
|
||||
"<strong>Пользовательская история:</strong> Я могу видеть таблицу кемперов freeCodeCamp, которые получили наибольшее количество очков за последние 30 дней.",
|
||||
"<strong>Пользовательская история:</strong> Я могу видеть сколько очков они получили за последние 30 дней, и сколько они получили их всего.",
|
||||
"<strong>Пользовательская история:</strong> Я могу отсортировать список по количеству очков, которые они получили за последние 30 дней, и по общему количеству полученных очков.",
|
||||
"<strong>Подсказка:</strong> Ссылка на топ 100 кемперов за последние 30 дней в формате JSON: <a href='https://fcctop100.herokuapp.com/api/fccusers/top/recent' target='_blank'>https://fcctop100.herokuapp.com/api/fccusers/top/recent</a>.",
|
||||
"<strong>Подсказка:</strong> Ссылка на топ 100 кемперов за все время в формате JSON: <a href='http://fcctop100.herokuapp.com/api/fccusers/top/alltime' target='_blank'>http://fcctop100.herokuapp.com/api/fccusers/top/alltime</a>.",
|
||||
"Если что-то не получается, не забывайте пользоваться методом <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Читай-Ищи-Спрашивай</a>.",
|
||||
"Когда закончите, нажмите кнопку \"I've completed this challenge\" и укажите ссылку на вашу работу на CodePen.",
|
||||
"Вы можете получить отзыв о вашем проекте от коллег, поделившись ссылкой на него в нашем <a href='//gitter.im/freecodecamp/codereview' target='_blank'>чате для рассмотрения кода</a>. Также вы можете поделиться ею через Twitter и на странице freeCodeCamp вашего города на Facebook."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7155d8c242eddfaeb5bd13",
|
||||
"title": "Build a Recipe Box",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/dNVazZ/' target='_blank'>https://codepen.io/freeCodeCamp/full/dNVazZ/</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can create recipes that have names and ingredients.",
|
||||
"<strong>User Story:</strong> I can see an index view where the names of all the recipes are visible.",
|
||||
"<strong>User Story:</strong> I can click into any of those recipes to view it.",
|
||||
"<strong>User Story:</strong> I can edit these recipes.",
|
||||
"<strong>User Story:</strong> I can delete these recipes.",
|
||||
"<strong>User Story:</strong> All new recipes I add are saved in my browser's local storage. If I refresh the page, these recipes will still be there.",
|
||||
"<strong>Hint: </strong> You should prefix your local storage keys on CodePen, i.e. <code>_username_recipes</code>",
|
||||
"Remember to use <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/FreeCodeCamp-Get-Help' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"releasedOn": "January 1, 2016",
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"isRequired": false,
|
||||
"challengeType": 3,
|
||||
"translations": {
|
||||
"ru": {
|
||||
"title": "Создайте хранилище рецептов",
|
||||
"description": [
|
||||
"<strong>Задание:</strong> Создайте приложение <a href='https://codepen.io' target='_blank'>CodePen.io</a>, функционал которого схож с этим: <a href='https://codepen.io/freeCodeCamp/full/dNVazZ/' target='_blank'>https://codepen.io/freeCodeCamp/full/dNVazZ/</a>.",
|
||||
"<strong>Правило #1:</strong> Не подсматривайте код приложения-примера. Напишите его самостоятельно.",
|
||||
"<strong>Правило #2:</strong> Приложение должно удовлетворять нижеприведённым <a href='https://ru.wikipedia.org/wiki/Пользовательские_истории' target='_blank'>пользовательским историям</a>. Используйте любые библиотеки или API, которые потребуются. Придайте ему свой личный стиль.",
|
||||
"<strong>Правило #3:</strong> Для создания этого проекта вы должны использовать Sass и React.",
|
||||
"<strong>Пользовательская история:</strong> Я могу создавать рецепты, содержащие название и ингредиенты.",
|
||||
"<strong>Пользовательская история:</strong> Я могу просмотреть корневой вид, на котором видны все рецепты.",
|
||||
"<strong>Пользовательская история:</strong> Я могу нажать на имя каждого из рецептов для просмотра содержимого.",
|
||||
"<strong>Пользовательская история:</strong> Я могу отредактировать эти рецепты.",
|
||||
"<strong>Пользовательская история:</strong> Я могу удалить эти рецепты.",
|
||||
"<strong>Пользовательская история:</strong> Все новые рецепты, которые я добавил, сохранены в локальном хранилище моего браузера. Если я обновлю страницу, эти рецепты будут всё ещё там.",
|
||||
"Если что-то не получается, не забывайте пользоваться методом <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/FreeCodeCamp-Get-Help' target='_blank'>Читай-Ищи-Спрашивай</a>.",
|
||||
"Когда закончите, нажмите кнопку \"I've completed this challenge\" и укажите ссылку на вашу работу на CodePen.",
|
||||
"Вы можете получить отзыв о вашем проекте от коллег, поделившись ссылкой на него в нашем <a href='//gitter.im/freecodecamp/codereview' target='_blank'>чате для рассмотрения кода</a>. Также вы можете поделиться ею через Twitter и на странице Free Code Camp вашего города на Facebook."
|
||||
]
|
||||
},
|
||||
"es": {
|
||||
"title": "Crea una caja de recetas",
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación en <a href='https://codepen.io' target='_blank'>CodePen.io</a> que funcione de forma similar al siguiente ejemplo: <a href='https://codepen.io/freeCodeCamp/full/dNVazZ/' target='_blank'>https://codepen.io/freeCodeCamp/full/dNVazZ/</a>.",
|
||||
"<strong>Regla #1:</strong> No veas el código del proyecto de ejemplo. Encuentra la forma de hacerlo por tu cuenta.",
|
||||
"<strong>Regla #2:</strong> Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o API que sea necesaria. ¡Ponle un toque personal!.",
|
||||
"<strong>Rule #3:</strong> Debes utilizar ambos Sass y React para construir este proyecto.",
|
||||
"<strong>Historia de usuario:</strong> Puedo crear recetas a las que les puedo poner un nombre y los ingredientes necesarios.",
|
||||
"<strong>Historia de usuario:</strong> Puedo ver un índice que contenga los nombres de todas las recetas.",
|
||||
"<strong>Historia de usuario:</strong> Puedo pulsar cualquiera de las recetas para verla.",
|
||||
"<strong>Historia de usuario:</strong> Puedo editar las recetas.",
|
||||
"<strong>Historia de usuario:</strong> Puedo eliminar las recetas.",
|
||||
"<strong>Historia de usuario:</strong> Las recetas que voy agregando deben guardarse en el almacenamiento local de mi navegador. Las recetas deben seguir allí si refresco la página.",
|
||||
"Recuerda utilizar <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/FreeCodeCamp-Get-Help' target='_blank'>Read-Search-Ask</a> si te sientes atascado.",
|
||||
"Cuando termines, haz clic en el botón de \"I've completed this challenge\" e incluye el vínculo de tu proyecto en CodePen. ",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7154d8c242eddfaeb5bd13",
|
||||
"title": "Build the Game of Life",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/BpwMZv/' target='_blank'>https://codepen.io/freeCodeCamp/full/BpwMZv/</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> When I first arrive at the game, it will randomly generate a board and start playing.",
|
||||
"<strong>User Story:</strong> I can start and stop the board.",
|
||||
"<strong>User Story:</strong> I can set up the board.",
|
||||
"<strong>User Story:</strong> I can clear the board.",
|
||||
"<strong>User Story:</strong> When I press start, the game will play out.",
|
||||
"<strong>User Story:</strong> Each time the board changes, I can see how many generations have gone by.",
|
||||
"<strong>Hint:</strong> Here's an explanation of Conway's Game of Life from John Conway himself: <a href='https://www.youtube.com/watch?v=E8kUJL04ELA' target='_blank'>https://www.youtube.com/watch?v=E8kUJL04ELA</a>",
|
||||
"<strong>Hint:</strong> Here's an overview of Conway's Game of Life with rules for your reference: <a href='https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life' target='_blank'>https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life</a>",
|
||||
"Remember to use <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/FreeCodeCamp-Get-Help' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. ",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"releasedOn": "January 1, 2016",
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"isRequired": false,
|
||||
"challengeType": 3,
|
||||
"translations": {
|
||||
"ru": {
|
||||
"title": "Создайте игру \"Жизнь\"",
|
||||
"description": [
|
||||
"<strong>Задание:</strong> Создайте приложение <a href='https://codepen.io' target='_blank'>CodePen.io</a>, функционал которого схож с этим: <a href='https://codepen.io/freeCodeCamp/full/BpwMZv/' target='_blank'>https://codepen.io/freeCodeCamp/full/BpwMZv/</a>.",
|
||||
"<strong>Правило #1:</strong> Не подсматривайте код приложения-примера. Напишите его самостоятельно.",
|
||||
"<strong>Правило #2:</strong> Приложение должно удовлетворять нижеприведённым <a href='https://ru.wikipedia.org/wiki/Пользовательские_истории' target='_blank'>пользовательским историям</a>. Используйте любые библиотеки или API, которые потребуются. Придайте ему свой личный стиль.",
|
||||
"<strong>Правило #3:</strong> Для создания этого проекта вы должны использовать Sass и React.",
|
||||
"<strong>Пользовательская история:</strong> Когда я впервые запускаю игру, она генерирует доску случайным образом и начинает игру.",
|
||||
"<strong>Пользовательская история:</strong> Я могу запустить и остановить игру.",
|
||||
"<strong>Пользовательская история:</strong> Я могу настроить доску.",
|
||||
"<strong>Пользовательская история:</strong> Я могу очистить доску.",
|
||||
"<strong>Пользовательская история:</strong> Когда я нажимаю начать, игра начинает воспроизведение.",
|
||||
"<strong>Пользовательская история:</strong> Каждый раз, когда доска меняется, я могу видеть сколько поколений прошло.",
|
||||
"<strong>Подсказка:</strong> Вот объяснение игры \"Жизнь\" от её создателя Джона Конвея: <a href='https://www.youtube.com/watch?v=E8kUJL04ELA' target='_blank'>https://www.youtube.com/watch?v=E8kUJL04ELA</a>",
|
||||
"<strong>Подсказка:</strong> Вот обзор правил игры \"Жизнь\" для вашего сведения: <a href='https://ru.wikipedia.org/wiki/Жизнь_(игра)' target='_blank'>https://ru.wikipedia.org/wiki/Жизнь_(игра)</a>",
|
||||
"Если что-то не получается, не забывайте пользоваться методом <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/FreeCodeCamp-Get-Help' target='_blank'>Читай-Ищи-Спрашивай</a>.",
|
||||
"Когда закончите, нажмите кнопку \"I've completed this challenge\" и укажите ссылку на вашу работу на CodePen.",
|
||||
"Вы можете получить отзыв о вашем проекте от коллег, поделившись ссылкой на него в нашем <a href='//gitter.im/freecodecamp/codereview' target='_blank'>чате для рассмотрения кода</a>. Также вы можете поделиться ею через Twitter и на странице Free Code Camp вашего города на Facebook."
|
||||
]
|
||||
},
|
||||
"es": {
|
||||
"title": "Crea un Juego de la vida",
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación en <a href='https://codepen.io' target='_blank'>CodePen.io</a> que funcione de forma similar al siguiente ejemplo: <a href='https://codepen.io/freeCodeCamp/full/BpwMZv/' target='_blank'>https://codepen.io/freeCodeCamp/full/BpwMZv/</a>.",
|
||||
"<strong>Regla #1:</strong> No veas el código del proyecto de ejemplo. Encuentra la forma de hacerlo por tu cuenta.",
|
||||
"<strong>Regla #2:</strong> Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o API que sea necesaria. ¡Ponle un toque personal!.",
|
||||
"<strong>Rule #3:</strong> Debes utilizar ambos Sass y React para construir este proyecto.",
|
||||
"<strong>Historia de usuario:</strong> La aplicación debe generar aleatoriamente un tablero y comenzar a jugar cuando entro al juego por primera vez.",
|
||||
"<strong>Historia de usuario:</strong> Puedo iniciar y detener el tablero.",
|
||||
"<strong>Historia de usuario:</strong> Puedo preparar el tablero.",
|
||||
"<strong>Historia de usuario:</strong> Puedo limpiar el tablero.",
|
||||
"<strong>Historia de usuario:</strong> El juego inicia cuando presiono un botón de inicio.",
|
||||
"<strong>Historia de usuario:</strong> Puedo ver cuántas generaciones han pasado cada vez que el tablero cambia.",
|
||||
"<strong>Pista:</strong> Puedes encontrar una explicación del Juego de la vida de Conway de parte del mismísimo John Conway aquí: <a href='https://www.youtube.com/watch?v=E8kUJL04ELA' target='_blank'>https://www.youtube.com/watch?v=E8kUJL04ELA</a>",
|
||||
"<strong>Pista:</strong> Puedes referirte al siguiente enlace para obtener información general acerca del Juego de la vida de Conway incluyendo las reglas del juego: <a href='https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life' target='_blank'>https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life</a>",
|
||||
"Recuerda utilizar <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/FreeCodeCamp-Get-Help' target='_blank'>Read-Search-Ask</a> si te sientes atascado.",
|
||||
"Cuando termines, haz clic en el botón de \"I've completed this challenge\" e incluye el vínculo de tu proyecto en CodePen. ",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7153d8c242eddfaeb5bd13",
|
||||
"title": "Build a Roguelike Dungeon Crawler Game",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/apLXEJ/' target='_blank'>https://codepen.io/freeCodeCamp/full/apLXEJ/</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I have health, a level, and a weapon. I can pick up a better weapon. I can pick up health items.",
|
||||
"<strong>User Story:</strong> All the items and enemies on the map are arranged at random.",
|
||||
"<strong>User Story:</strong> I can move throughout a map, discovering items.",
|
||||
"<strong>User Story:</strong> I can move anywhere within the map's boundaries, but I can't move through an enemy until I've beaten it.",
|
||||
"<strong>User Story:</strong> Much of the map is hidden. When I take a step, all spaces that are within a certain number of spaces from me are revealed.",
|
||||
"<strong>User Story:</strong> When I beat an enemy, the enemy goes away and I get XP, which eventually increases my level.",
|
||||
"<strong>User Story:</strong> When I fight an enemy, we take turns damaging each other until one of us loses. I do damage based off of my level and my weapon. The enemy does damage based off of its level. Damage is somewhat random within a range.",
|
||||
"<strong>User Story:</strong> When I find and beat the boss, I win.",
|
||||
"<strong>User Story:</strong> The game should be challenging, but theoretically winnable.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. ",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"releasedOn": "January 1, 2016",
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"isRequired": false,
|
||||
"challengeType": 3,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Crea un juego de dragones al estilo Rogue",
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación en <a href='https://codepen.io' target='_blank'>CodePen.io</a> que funcione de forma similar al siguiente ejemplo: <a href='https://codepen.io/freeCodeCamp/full/apLXEJ/' target='_blank'>https://codepen.io/freeCodeCamp/full/apLXEJ/</a>.",
|
||||
"Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o API que sea necesaria. ¡Ponle un toque personal!.",
|
||||
"<strong>Historia de usuario:</strong> Tengo energía, nivel de habilidad y un arma. Puedo recoger un arma mejor. Puedo recoger ítems que recuperan mi energía.",
|
||||
"<strong>Historia de usuario:</strong> Todos los ítems y los enemigos en el mapa están colocados aleatoriamente.",
|
||||
"<strong>Historia de usuario:</strong> Puedo moverme a lo largo de un mapa y descubrir ítems.",
|
||||
"<strong>Historia de usuario:</strong> Puedo moverme hacia cualquier parte dentro de los límites del mapa, pero no puedo moverme sobre un enemigo hasta que lo haya vencido.",
|
||||
"<strong>Historia de usuario:</strong> Gran parte del mapa está escondido. Cuando doy un paso, todos los espacios que están a cierto número de espacios de distancia de mi son revelados.",
|
||||
"<strong>Historia de usuario:</strong> Cuando venzo un enemigo, este desaparece y yo gano puntos de experiencia (XP), lo que eventualmente me permite aumentar de nivel.",
|
||||
"<strong>Historia de usuario:</strong> Cuando peleo con un enemigo, tomamos turnos haciéndonos daño hasta que uno de los dos pierde. El daño que hago está basado en mi nivel de experiencia y en el arma que estoy utilizando. El enemigo hace daño basado en su nivel. El daño es aleatorio dentro de cierto márgen.",
|
||||
"<strong>Historia de usuario:</strong> Gano el juego cuando encuentre y venza al jefe.",
|
||||
"<strong>Historia de usuario:</strong> El juego debe representar un reto, pero ganar debe ser teóricamente posible.",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> si te sientes atascado.",
|
||||
"Cuando termines, haz clic en el botón de \"I've completed this challenge\" e incluye el vínculo de tu proyecto en CodePen. ",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
},
|
||||
"ru": {
|
||||
"title": "Создайте Roguelike-подобную игру Подземелье",
|
||||
"description": [
|
||||
"<strong>Задание:</strong> Создайте приложение <a href='https://codepen.io' target='_blank'>CodePen.io</a>, функционал которого схож с этим: <a href='https://codepen.io/freeCodeCamp/full/apLXEJ/' target='_blank'>https://codepen.io/freeCodeCamp/full/apLXEJ/</a>.",
|
||||
"Приложение должно удовлетворять нижеприведённым <a href='https://ru.wikipedia.org/wiki/Пользовательские_истории' target='_blank'>пользовательским историям</a>. Используйте любые библиотеки или API, которые потребуются. Придайте ему свой личный стиль.",
|
||||
"<strong>Пользовательская история:</strong> У меня есть жизни, уровень и оружие. Я могу подобрать оружие получше. Я могу подобрать очки здоровья.",
|
||||
"<strong>Пользовательская история:</strong> Все предметы и враги располагаются на карте случайным образом.",
|
||||
"<strong>Пользовательская история:</strong> Я могу передвигаться по карте, обнаруживая новые предметы.",
|
||||
"<strong>Пользовательская история:</strong> Я могу двигаться куда угодно в рамках карты, но не могу продвинуться дальше врага, пока он не будет побежден.",
|
||||
"<strong>Пользовательская история:</strong> Большая часть карты скрыта. Когда я делаю шаг, все клетки в определенном количестве клеток от меня становятся видимы.",
|
||||
"<strong>Пользовательская история:</strong> Когда я побеждаю врага, враг исчезает, а я получаю очки опыта (XP), что увеличивает мой уровень.",
|
||||
"<strong>Пользовательская история:</strong> Когда я веду бой с врагом, мы поочередно наносим друг-другу повреждения, до тех пор пока кто-нибудь не победит. Я наношу повреждения, которые зависят от моего уровня и моего оружия. Враг наносит повреждения, которые зависят от его уровня. Значение повреждений распределено случайным образом в некотором диапазоне.",
|
||||
"<strong>Пользовательская история:</strong> Когад я нахожу и побеждаю босса, я выигрываю игру.",
|
||||
"<strong>Пользовательская история:</strong> Игра должна быть интересной и достаточно сложной, но теоретически проходимой.",
|
||||
"Если что-то не получается, не забывайте пользоваться методом <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Читай-Ищи-Спрашивай</a>.",
|
||||
"Когда закончите, нажмите кнопку \"I've completed this challenge\" и укажите ссылку на вашу работу на CodePen.",
|
||||
"Вы можете получить отзыв о вашем проекте от коллег, поделившись ссылкой на него в нашем <a href='//gitter.im/freecodecamp/codereview' target='_blank'>чате для рассмотрения кода</a>. Также вы можете поделиться ею через Twitter и на странице freeCodeCamp вашего города на Facebook."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7150d8c442eddfafb5bd1c",
|
||||
"title": "P2P Video Chat Application",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://glitch.com' target='_blank'>Glitch</a> app that is functionally similar to this: <a href='https://grove-voice.glitch.me/' target='_blank'>https://grove-voice.glitch.me</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> Upon arriving, the browser will prompt me to access my camera and microphone. ",
|
||||
"<strong>User Story:</strong> After I give it permission, I am prompted to type in a room name.",
|
||||
"<strong>User Story:</strong> Once I type in the room name, a room will be created if no room of that name existed before. ",
|
||||
"<strong>User Story:</strong> A friend of mine can subsequently go to the same website, type in the same room I entered, and join the same room, then enter into a video chat with me. ",
|
||||
"<strong>User Story:</strong> If I type in a room name, and there are already two people in that room, I get a notification that the room is full. ",
|
||||
"<strong>User Story:</strong> Anyone can create or join any room. And there can be any number of rooms, but all of them must have unique names. ",
|
||||
"<strong>User Story:</strong> I can choose to not permit the site to access my microphone and webcam. If I choose not to do this, if some other driver problem occurs, I see an error message saying these are required. ",
|
||||
"<strong>User Story:</strong> When I choose to cancel the room name input step, or if I type in no name, or just spaces, it should again ask me again to type in a valid room name. ",
|
||||
"<strong>User Story:</strong> If one of the two people in the room get disconnected, they can reconnect to the same room and continue chatting.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your Glitch App.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"isRequired": false,
|
||||
"releasedOn": "January 1, 2016"
|
||||
},
|
||||
{
|
||||
"id": "bd7198d8c242eddfaeb5bd13",
|
||||
"title": "Show National Contiguity with a Force Directed Graph",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/xVopBo' target='_blank'>https://codepen.io/freeCodeCamp/full/xVopBo</a>.",
|
||||
"Fulfill the following <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can see a Force-directed Graph that shows which countries share borders.",
|
||||
"<strong>User Story:</strong> I can see each country's flag on its node.",
|
||||
"<strong>Hint:</strong> Here's a dataset you can use to build this: <a href='https://raw.githubusercontent.com/DealPete/forceDirected/master/countries.json' target='_blank'>https://raw.githubusercontent.com/DealPete/forceDirected/master/countries.json</a>",
|
||||
"<strong>Hint:</strong> You can create a spritesheet of national flags at <a href='https://www.flag-sprites.com' target='_blank'>https://www.flag-sprites.com</a>.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. ",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"isRequired": false,
|
||||
"releasedOn": "January 1, 2016",
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Muestra asociaciones utilizando un gráfico de fuerzas dirigidas",
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación en <a href='https://codepen.io' target='_blank'>CodePen.io</a> que funcione de forma similar al siguiente ejemplo: <a href='https://codepen.io/freeCodeCamp/full/KVNNXY' target='_blank'>https://codepen.io/freeCodeCamp/full/KVNNXY</a>.",
|
||||
"<strong>Regla #1:</strong> No veas el código del proyecto de ejemplo. Encuentra la forma de hacerlo por tu cuenta.",
|
||||
"<strong>Regla #2:</strong> Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o API que sea necesaria. ¡Ponle un toque personal!.",
|
||||
"<strong>Regla #3:</strong> Debes utilizar D3.js para construir este proyecto.",
|
||||
"<strong>Historia de usuario:</strong> Puedo ver un gráfico de fuerza dirigida que muestra qué campistas están publicando enlaces en Camper News hacia qué dominios.",
|
||||
"<strong>Historia de usuario:</strong> Puedo ver el icono de cada campista en su nodo respectivo.",
|
||||
"<strong>Historia de usuario:</strong> Puedo ver la relación entre los campistas y los dominios que publican.",
|
||||
"<strong>Historia de usuario:</strong> Puedo conocer aproximadamente cuántas veces los campistas han enlazado un dominio en particular a partir del tamaño del nodo respectivo.",
|
||||
"<strong>Historia de usuario:</strong> Puedo conocer aproximadamente cuántas veces un campista específico ha publicado un enlace a partir del tamaño de su nodo.",
|
||||
"<strong>Pista:</strong> La siguiente es la ruta del API de noticias de Camper News: <code>http://www.freecodecamp.org/news/hot</code>.",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> si te sientes atascado.",
|
||||
"Cuando termines, haz clic en el botón de \"I've completed this challenge\" e incluye el vínculo de tu proyecto en CodePen. ",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7108d8c242eddfaeb5bd13",
|
||||
"title": "Map Data Across the Globe",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/mVEJag' target='_blank'>https://codepen.io/freeCodeCamp/full/mVEJag</a>.",
|
||||
"Fulfill the following <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can see where all Meteorites landed on a world map.",
|
||||
"<strong>User Story:</strong> I can tell the relative size of the meteorite, just by looking at the way it's represented on the map.",
|
||||
"<strong>User Story:</strong> I can mouse over the meteorite's data point for additional data.",
|
||||
"<strong>Hint:</strong> Here's a dataset you can use to build this: <a href='https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/meteorite-strike-data.json' target='_blank'>https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/meteorite-strike-data.json</a>",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. ",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"isRequired": false,
|
||||
"releasedOn": "January 1, 2016",
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"translations": {
|
||||
"es": {
|
||||
"title": "Mapea datos a lo largo del Globo",
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación en <a href='https://codepen.io' target='_blank'>CodePen.io</a> que funcione de forma similar al siguiente ejemplo: <a href='https://codepen.io/freeCodeCamp/full/mVEJag' target='_blank'>https://codepen.io/freeCodeCamp/full/mVEJag</a>.",
|
||||
"<strong>Regla #1:</strong> No veas el código del proyecto de ejemplo. Encuentra la forma de hacerlo por tu cuenta.",
|
||||
"<strong>Regla #2:</strong> Satisface las siguientes <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>historias de usuario</a>. Usa cualquier librería o API que sea necesaria. ¡Ponle un toque personal!.",
|
||||
"<strong>Regla #3:</strong> Debes utilizar D3.js para construir este proyecto.",
|
||||
"<strong>Historia de usuario:</strong> Puedo ver a dónde cayeron todos los meteoritos en un mapa mundi.",
|
||||
"<strong>Historia de usuario:</strong> Puedo distinguir el tamaño relativo de cada meteorito simplemente viendo la forma en que está representado en el mapa.",
|
||||
"<strong>Historia de usuario:</strong> Puedo mover el ratón sobre el dato de cada meteorito para obtener información adicional.",
|
||||
"<strong>Pista:</strong> Puedes utilizar el siguiente conjunto de datos para construir tu proyecto: <a href='https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/meteorite-strike-data.json' target='_blank'>https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/meteorite-strike-data.json</a>",
|
||||
"Recuerda utilizar <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> si te sientes atascado.",
|
||||
"Cuando termines, haz clic en el botón de \"I've completed this challenge\" e incluye el vínculo de tu proyecto en CodePen. ",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c443eddfaeb5bd0f",
|
||||
"title": "Manage a Book Trading Club",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://glitch.com' target='_blank'>Glitch</a> app that is functionally similar to this: <a href='https://chrome-delivery.glitch.me/ /' target='_blank'>https://chrome-delivery.glitch.me</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can view all books posted by every user.",
|
||||
"<strong>User Story:</strong> I can add a new book.",
|
||||
"<strong>User Story:</strong> I can update my settings to store my full name, city, and state.",
|
||||
"<strong>User Story:</strong> I can propose a trade and wait for the other user to accept the trade.",
|
||||
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "basejump",
|
||||
"challengeType": 4,
|
||||
"translations": {
|
||||
"es": {
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación de pila completa (full stack) en JavaScript que funcione de forma similar al siguiente proyecto: <a href='http://bookjump.herokuapp.com/' target='_blank'>http://bookjump.herokuapp.com/</a> y despliégalo en Heroku.",
|
||||
"Ten en cuenta que para cada proyecto, debes crear un nuevo repositorio en GitHub y un nuevo proyecto en Heroku. Si no recuerdas cómo hacerlo, visita de nuevo <a href='/challenges/get-set-for-our-dynamic-web-application-projects'>https://freecodecamp.org/challenges/get-set-for-our-dynamic-web-application-projects</a>.",
|
||||
"Estas son las Historias de usuario que debes satisfacer para este Basejump:",
|
||||
"<strong>Historia de usuario:</strong> Puedo ver todos los libros agregados por cada usuario.",
|
||||
"<strong>Historia de usuario:</strong> Puedo agregar un nuevo libro.",
|
||||
"<strong>Historia de usuario:</strong> Puedo actualizar mi configuración para que almacene mi nombre completo, ciudad y Estado.",
|
||||
"<strong>Historia de usuario:</strong> Puedo proponer un intercambio y esperar a que algún otro usuario acepte el trato.",
|
||||
"Una vez hayas terminado de implementar estas historias de usuario, pulsa el botón de \"I've completed this challenge\" e incluye las URLs de tu repositorio GitHub y de tu aplicación corriendo en Heroku.",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
],
|
||||
"title": "Administra un club de intercambio de libros"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c443eddfaeb5bdee",
|
||||
"title": "Build a Pinterest Clone",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://glitch.com' target='_blank'>Glitch</a> app that is functionally similar to this: <a href='https://wild-song.glitch.me/' target='_blank'>https://wild-song.glitch.me</a>.",
|
||||
"Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> As an unauthenticated user, I can login with GitHub.",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can link to images.",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can delete images that I've linked to.",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can see a Pinterest-style wall of all the images I've linked to.",
|
||||
"<strong>User Story:</strong> As an unauthenticated user, I can browse other users' walls of images.",
|
||||
"<strong>User Story:</strong> As an authenticated user, if I upload an image that is broken, it will be replaced by a placeholder image. (can use jQuery broken image detection)",
|
||||
"<strong>Hint:</strong> <a href='http://masonry.desandro.com/' target='_blank'>Masonry.js</a> is a library that allows for Pinterest-style image grids.",
|
||||
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "basejump",
|
||||
"challengeType": 4,
|
||||
"translations": {
|
||||
"es": {
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación de pila completa (full stack) en JavaScript que funcione de forma similar al siguiente proyecto: <a href='https://midnight-dust.glitch.me/' target='_blank'>https://midnight-dust.glitch.me/</a> y despliégalo en Heroku.",
|
||||
"Ten en cuenta que para cada proyecto, debes crear un nuevo repositorio en GitHub y un nuevo proyecto en Heroku. Si no recuerdas cómo hacerlo, visita de nuevo <a href='/challenges/get-set-for-our-dynamic-web-application-projects'>https://freecodecamp.org/challenges/get-set-for-our-dynamic-web-application-projects</a>.",
|
||||
"Estas son las Historias de usuario que debes satisfacer para este Basejump:",
|
||||
"<strong>Historia de usuario:</strong> Como usuario autenticado, puedo acceder a mi cuenta con Twitter.",
|
||||
"<strong>Historia de usuario:</strong> Como usuario autenticado, puedo agregar enlaces a imágenes.",
|
||||
"<strong>Historia de usuario:</strong> Como usuario autenticado, puedo elimiar imágenes que he agregado.",
|
||||
"<strong>Historia de usuario:</strong> Como usuario autenticado, puedo ver un muro al estilo de Pinterest con todas las imágenes para las que he agregado un enlace.",
|
||||
"<strong>Historia de usuario:</strong> Como usuario no autenticado, puedo navegar los muros de imágenes de otros usuarios.",
|
||||
"<strong>Historia de usuario:</strong> Como usuario autenticado, si agrego una imagen corrupta, será reemplazada por una imagen predeterminada. (Puedes utilizar la detección de imágenes corruptas de jQuery)",
|
||||
"<strong>Pista:</strong> <a href='http://masonry.desandro.com/' target='_blank'>Masonry.js</a> es una librería que permite crear cuadrículas de imágenes al estilo de Pinterest.",
|
||||
"Una vez hayas terminado de implementar estas historias de usuario, pulsa el botón de \"I've completed this challenge\" e incluye las URLs de tu repositorio GitHub y de tu aplicación corriendo en Heroku.",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
],
|
||||
"title": "Crea un clon de Pinterest"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c443eddfaeb5bdff",
|
||||
"title": "Build a Nightlife Coordination App",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a full stack JavaScript app that is functionally similar to this: <a href='http://whatsgoinontonight.herokuapp.com/' target='_blank'>http://whatsgoinontonight.herokuapp.com/</a> and deploy it to Heroku.",
|
||||
"Note that for each project, you should create a new GitHub repository and a new Heroku project. If you can't remember how to do this, revisit <a href='/challenges/get-set-for-our-dynamic-web-application-projects'>https://freecodecamp.com/challenges/get-set-for-our-dynamic-web-application-projects</a>.",
|
||||
"Here are the specific user stories you should implement for this project:",
|
||||
"<strong>User Story:</strong> As an unauthenticated user, I can view all bars in my area.",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can add myself to a bar to indicate I am going there tonight.",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can remove myself from a bar if I no longer want to go there.",
|
||||
"<strong>User Story:</strong> As an unauthenticated user, when I login I should not have to search again.",
|
||||
"<strong>Hint:</strong> Try using the <a href='https://www.yelp.com/developers/documentation/v2/overview' target='_blank'>Yelp API</a> to find venues in the cities your users search for. If you use Yelp's API, be sure to mention so in your app.",
|
||||
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [
|
||||
"Gei7QfPmcMw"
|
||||
],
|
||||
"tests": [],
|
||||
"type": "basejump",
|
||||
"challengeType": 4,
|
||||
"isRequired": true,
|
||||
"translations": {
|
||||
"es": {
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación de pila completa (full stack) en JavaScript que funcione de forma similar al siguiente proyecto: <a href='http://whatsgoinontonight.herokuapp.com/' target='_blank'>http://whatsgoinontonight.herokuapp.com/</a> y despliégala en Heroku.",
|
||||
"Ten en cuenta que para cada proyecto, debes crear un nuevo repositorio en GitHub y un nuevo proyecto en Heroku. Si no recuerdas cómo hacerlo, visita de nuevo <a href='/challenges/get-set-for-our-dynamic-web-application-projects'>https://freecodecamp.com/challenges/get-set-for-our-dynamic-web-application-projects</a>.",
|
||||
"Estas son las Historias de usuario que debes satisfacer para este Basejump:",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario no autenticado, puedo ver todos los bares en mi área.",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado, puedo agregarme a mí mismo a un bar para indicar que voy a estar allí esta noche.",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado, puedo removerme de un bar si ya no pienso ir allí.",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario no autenticado, cuando accedo a mi cuenta no debo tener la necesidad de buscar de nuevo.",
|
||||
"<span class='text-info'>Pista:</span> Prueba utilizar el <a href='https://www.yelp.com/developers/documentation/v2/overview' target='_blank'>API de Yelp</a> para encontrar lugares en las ciudades donde tus usuarios buscan. Si utilizas el API de Yelp, asegúrate de mencionarlo en tu aplicación.",
|
||||
"Una vez hayas terminado de implementar estas historias de usuario, pulsa el botón de \"I've completed this challenge\" e incluye las URLs de tu repositorio GitHub y de tu aplicación corriendo en Heroku.",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c443eddfaeb5bd0e",
|
||||
"title": "Chart the Stock Market",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a full stack JavaScript app that is functionally similar to this: <a href='http://watchstocks.herokuapp.com/' target='_blank'>http://watchstocks.herokuapp.com/</a> and deploy it to Heroku.",
|
||||
"Note that for each project, you should create a new GitHub repository and a new Heroku project. If you can't remember how to do this, revisit <a href='/challenges/get-set-for-our-dynamic-web-application-projects'>https://freecodecamp.com/challenges/get-set-for-our-dynamic-web-application-projects</a>.",
|
||||
"Here are the specific user stories you should implement for this project:",
|
||||
"<strong>User Story:</strong> I can view a graph displaying the recent trend lines for each added stock.",
|
||||
"<strong>User Story:</strong> I can add new stocks by their symbol name.",
|
||||
"<strong>User Story:</strong> I can remove stocks.",
|
||||
"<strong>User Story:</strong> I can see changes in real-time when any other user adds or removes a stock. For this you will need to use Web Sockets.",
|
||||
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [
|
||||
"CENs50cnRgM"
|
||||
],
|
||||
"tests": [],
|
||||
"type": "basejump",
|
||||
"challengeType": 4,
|
||||
"isRequired": true,
|
||||
"translations": {
|
||||
"es": {
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación de pila completa (full stack) en JavaScript que funcione de forma similar al siguiente proyecto: <a href='http://watchstocks.herokuapp.com/' target='_blank'>http://watchstocks.herokuapp.com/</a> y despliégalo en Heroku.",
|
||||
"Ten en cuenta que para cada proyecto, debes crear un nuevo repositorio en GitHub y un nuevo proyecto en Heroku. Si no recuerdas cómo hacerlo, visita de nuevo <a href='/challenges/get-set-for-our-dynamic-web-application-projects'>https://freecodecamp.com/challenges/get-set-for-our-dynamic-web-application-projects</a>.",
|
||||
"Estas son las Historias de usuario que debes satisfacer para este Basejump:",
|
||||
"<strong>Historia de usuario:</strong> Como usuario, puedo ver un gráfico que me muestre las líneas de tendencia recientes para cada acción agregada.",
|
||||
"<strong>Historia de usuario:</strong> Como usuario, puedo agregar nuevas acciones por su símbolo.",
|
||||
"<strong>Historia de usuario:</strong> Como usuario, puedo remover acciones.",
|
||||
"<strong>Historia de usuario:</strong> Como usuario, puedo ver cambios en tiempo real cuando algún otro usuario agrega o remueve una acción. Puedes usar Web Sockets para hacer esto.",
|
||||
"Una vez hayas terminado de implementar estas historias de usuario, pulsa el botón de \"I've completed this challenge\" e incluye las URLs de tu repositorio GitHub y de tu aplicación corriendo en Heroku.",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd7158d8c443eddfaeb5bdef",
|
||||
"title": "Build a Voting App",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a full stack JavaScript app that is functionally similar to this: <a href='https://fcc-voting-arthow4n.herokuapp.com/' target='_blank'>https://fcc-voting-arthow4n.herokuapp.com/</a> and deploy it to Heroku.",
|
||||
"Note that for each project, you should create a new GitHub repository and a new Heroku project. If you can't remember how to do this, revisit <a href='/challenges/get-set-for-our-dynamic-web-application-projects'>https://freecodecamp.com/challenges/get-set-for-our-dynamic-web-application-projects</a>.",
|
||||
"Here are the specific user stories you should implement for this project:",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can keep my polls and come back later to access them.",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can share my polls with my friends.",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can see the aggregate results of my polls.",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can delete polls that I decide I don't want anymore.",
|
||||
"<strong>User Story:</strong> As an authenticated user, I can create a poll with any number of possible items.",
|
||||
"<strong>User Story:</strong> As an unauthenticated or authenticated user, I can see and vote on everyone's polls.",
|
||||
"<strong>User Story:</strong> As an unauthenticated or authenticated user, I can see the results of polls in chart form. (This could be implemented using Chart.js or Google Charts.)",
|
||||
"<strong>User Story:</strong> As an authenticated user, if I don't like the options on a poll, I can create a new option.",
|
||||
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [
|
||||
"JBKnbY_fdg4"
|
||||
],
|
||||
"tests": [],
|
||||
"type": "basejump",
|
||||
"challengeType": 4,
|
||||
"isRequired": true,
|
||||
"translations": {
|
||||
"es": {
|
||||
"description": [
|
||||
"<strong>Objetivo:</strong> Construye una aplicación de pila completa (full stack) en JavaScript que funcione de forma similar al siguiente proyecto: <a href='https://fcc-voting-arthow4n.herokuapp.com/' target='_blank'>https://fcc-voting-arthow4n.herokuapp.com/</a> y despliégala en Heroku.",
|
||||
"Ten en cuenta que para cada proyecto, debes crear un nuevo repositorio en GitHub y un nuevo proyecto en Heroku. Si no recuerdas cómo hacerlo, visita de nuevo <a href='/challenges/get-set-for-our-dynamic-web-application-projects'>https://freecodecamp.com/challenges/get-set-for-our-dynamic-web-application-projects</a>.",
|
||||
"Estas son las Historias de usuario que debes satisfacer para este proyecto:",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado, puedo guardar mis votaciones y acceder a ellas posteriormente.",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado, puedo compartir mis votaciones con mis amigos.",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado, puedo ver los resultados agregados de mis votaciones.",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado, puedo eliminar votaciones que ya no quiero tener guardadas.",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado, puedo crear una votación con cualquier número de opciones.",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado o no autenticado, puedo ver y votar en las votaciones de otros.",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado o no autenticado, puedo ver los resultados de las votaciones por medio de un gráfico. (Esto podría implementarse utilizando Chart.js o Google Charts.)",
|
||||
"<strong>Historia de usuario:</strong> Como un usuario autenticado, si no me gustan las opciones en una votación, puedo crear una nueva opción.",
|
||||
"Una vez hayas terminado de implementar estas historias de usuario, pulsa el botón de \"I've completed this challenge\" e incluye las URLs de tu repositorio GitHub y de tu aplicación corriendo en Heroku.",
|
||||
"Puedes obtener retroalimentación acerca de tu proyecto de parte de tus compañeros campistas compartiéndolo en nuestro <a href='//gitter.im/freecodecamp/codereview' target='_blank'>Cuarto de revisión de código</a>. También puedes compartirlo en Twitter y en el campamento de tu ciudad (en Facebook)."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "5a4b7fcdb66f799f199e11db",
|
||||
"title": "Build a Pong Game",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/satyamdev/full/pdMmBp' target='_blank'>https://codepen.io/satyamdev/full/pdMmBp</a>.",
|
||||
"<strong>Rule #1:</strong> Don't look at the example project's code. Figure it out for yourself.",
|
||||
"<strong>Rule #2:</strong> Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can control a paddle.",
|
||||
"<strong>User Story:</strong> The computer can control the other paddle.",
|
||||
"<strong>User Story:</strong> The computer's paddle is unbeatable. It should never miss the ball.",
|
||||
"<strong>User Story:</strong> The game keeps track of the player and computer's score.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"id": "5a5d02bd919fcf9ca8cf46cb",
|
||||
"title": "Build a Light-Bright App",
|
||||
"description": [
|
||||
"<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/eyLYXE' target='_blank'>https://codepen.io/freeCodeCamp/full/eyLYXE</a>.",
|
||||
"<strong>Rule #1:</strong> Don't look at the example project's code. Figure it out for yourself.",
|
||||
"<strong>Rule #2:</strong> Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a>. Use whichever libraries or APIs you need. Give it your own personal style.",
|
||||
"<strong>User Story:</strong> I can click or drag the mouse cursor to color the circles.",
|
||||
"<strong>User Story:</strong> I can double-click on a colored circle to remove the color.",
|
||||
"<strong>User Story:</strong> I can click on a colored circle to change its color.",
|
||||
"<strong>User Story:</strong> I should get a circle of different color on each click.",
|
||||
"<strong>User Story:</strong> I can click on the 'Reset' button to remove the recent color.",
|
||||
"<strong>User Story:</strong> I can click on the 'Reset All' button to remove all the colors from the circles.",
|
||||
"Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen.",
|
||||
"You can get feedback on your project by sharing it with your friends on Facebook."
|
||||
],
|
||||
"challengeSeed": [],
|
||||
"tests": [],
|
||||
"type": "zipline",
|
||||
"challengeType": 3,
|
||||
"isRequired": false
|
||||
}
|
||||
],
|
||||
"fileName": "08-coding-interview-questions-and-take-home-assignments/take-home-interview-projects.json",
|
||||
"superBlock": "coding-interview-questions-and-take-home-assignments",
|
||||
"superOrder": 8
|
||||
}
|
249
packages/learn/seed/project-euler-guide.md
Normal file
249
packages/learn/seed/project-euler-guide.md
Normal file
@ -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: <code>euler23()</code> 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: <code>sumOfNonAbundantNumbers(10000)</code> should return 3731004.');",
|
||||
"assert(sumOfNonAbundantNumbers(15000) === 4039939, 'message: <code>sumOfNonAbundantNumbers(15000)</code> should return 4039939.');",
|
||||
"assert(sumOfNonAbundantNumbers(20000) === 4159710, 'message: <code>sumOfNonAbundantNumbers(20000)</code> should return 4159710.');",
|
||||
"assert(sumOfNonAbundantNumbers(28123) === 4179871, 'message: <code>sumOfNonAbundantNumbers(28123)</code> 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 <branch_name>`
|
||||
|
||||
### 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 <branch_name>`
|
||||
|
||||
### 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 :)
|
File diff suppressed because it is too large
Load Diff
37084
packages/learn/seed/requiresTests/rosetta-code-problems.json
Normal file
37084
packages/learn/seed/requiresTests/rosetta-code-problems.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user