Skip to content

Commit a93fc19

Browse files
authored
Merge pull request #80 from bobbybaxter/bugfix/arrays-and-two-pointers
bugfix/arrays and two pointers
2 parents 5fa104c + 3a85a7c commit a93fc19

20 files changed

Lines changed: 95 additions & 97 deletions

File tree

src/sections/03-algorithmic-thinking/_b032e981/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TestResult } from "@nss-workshops/nss-core";
22

33
export default {
44
id: 'b032e981',
5-
title: 'Module 2 - Code Excercise 1',
5+
title: 'Module 2 - Code Exercise 1',
66
sectionId: 'algorithmic-thinking',
77
previousChapterId: null,
88
content: `

src/sections/03-algorithmic-thinking/_b892f062/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TestResult } from "@nss-workshops/nss-core";
22

33
export default {
44
id: 'b892f062',
5-
title: 'Module 2 - Code Excercise 2',
5+
title: 'Module 2 - Code Exercise 2',
66
sectionId: 'algorithmic-thinking',
77
previousChapterId: null,
88
content: `

src/sections/04-arrays-and-two-pointers/03-array-core-operations/starterCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
// let strategicSet = ["Hotel California", "Sweet Child O' Mine"];
4646
// addSongStrategically(strategicSet, "Thunderstruck", "beginning");
4747
// addSongStrategically(strategicSet, "Free Bird", "end");
48-
// addSongStrategically(strategicSet, 2, "Wonderwall");
48+
// addSongStrategically(strategicSet, "Wonderwall", 2);
4949
// console.log("Strategic setlist:", strategicSet);
5050

5151
// ==============================

src/sections/04-arrays-and-two-pointers/03-array-core-operations/tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const tests = [
128128
return { passed: false, message: "removeSongStrategically function not found. Make sure to uncomment and implement it." };
129129
}
130130

131-
const expectedArray = [];
131+
const expectedArray = ["C"];
132132
const expectedRemoved = ["D", "A", "B"];
133133

134134
if (JSON.stringify(testResult.result) !== JSON.stringify(expectedArray)) {

src/sections/04-arrays-and-two-pointers/05-array-methods/index.md

Lines changed: 76 additions & 76 deletions
Large diffs are not rendered by default.

src/sections/04-arrays-and-two-pointers/05-array-methods/solution.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ function managePerformanceQueue(initialLineup, newOpeners, finishedActs) {
1717
let lineup = [...initialLineup];
1818

1919
// Add new opening acts to the beginning
20-
newOpeners.forEach(opener => {
21-
lineup.unshift(opener);
22-
});
20+
lineup.unshift(...newOpeners);
2321

2422
// Remove finished acts from the beginning
2523
for (let i = 0; i < finishedActs; i++) {

src/sections/04-arrays-and-two-pointers/_7a106b96/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TestResult } from "@nss-workshops/nss-core";
22

33
export default {
44
id: '7a106b96',
5-
title: 'Module 3 - Code Excercise 1',
5+
title: 'Module 3 - Code Exercise 1',
66
sectionId: 'arrays-and-two-pointers',
77
previousChapterId: null,
88
content: `

src/sections/04-arrays-and-two-pointers/_a62881e6/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TestResult } from "@nss-workshops/nss-core";
22

33
export default {
44
id: 'a62881e6',
5-
title: 'Module 3 - Code Excercise 2',
5+
title: 'Module 3 - Code Exercise 2',
66
sectionId: 'arrays-and-two-pointers',
77
previousChapterId: null,
88
content: `

src/sections/05-2d-arrays/_5e6361db/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TestResult } from "@nss-workshops/nss-core";
22

33
export default {
44
id: '5e6361db',
5-
title: 'Module 4 - Code Excercise 2',
5+
title: 'Module 4 - Code Exercise 2',
66
sectionId: '2d-arrays',
77
previousChapterId: null,
88
content: `

src/sections/05-2d-arrays/_9e31c844/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TestResult } from "@nss-workshops/nss-core";
22

33
export default {
44
id: '9e31c844',
5-
title: 'Module 4 - Code Excercise 1',
5+
title: 'Module 4 - Code Exercise 1',
66
sectionId: '2d-arrays',
77
previousChapterId: null,
88
content: `

0 commit comments

Comments
 (0)