Skip to content

Commit cd622a2

Browse files
authored
Merge pull request #78 from NSS-Workshops/develop
curriculum updates
2 parents 69618a9 + 247404d commit cd622a2

15 files changed

Lines changed: 200 additions & 165 deletions

File tree

package-lock.json

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@nss-workshops/nss-core": "0.2.23",
13+
"@nss-workshops/nss-core": "0.2.24",
1414
"@emotion/react": "^11.11.3",
1515
"@monaco-editor/react": "^4.7.0",
1616
"@testing-library/react": "^16.2.0",

src/sections/04-arrays-and-two-pointers/02-arrays-intro/index.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,12 @@ console.log(mayasOrders.length); // 3
8686
// ==============================
8787
```
8888

89-
- Implement the required logic
90-
- Click \`Run Code\`
91-
- Inspect \`📋 Console Output\` window for correctness!
89+
- Read the requirements written as comments in the code.
90+
- Implement the required logic.
91+
- Click `Run Code` and inspect `📋 Console Output` window for correctness!
92+
- Click `Run Tests`and ensure that test(s) related to this specific exercise are passing <span class="mtk8"> Passing test will show in green text.</span>
93+
94+
🚧 *Some tests for future exercises may fail at first — that’s expected. As you complete each exercise, those tests will start passing. By the time you finish the final exercise, all tests in the test suite should pass.*
9295

9396
---
9497

@@ -148,9 +151,12 @@ orders.splice(0, 0, "Priority Order"); // Potentially slow with many orders
148151
// ==============================
149152
```
150153

151-
- Implement the required logic
152-
- Click \`Run Code\`
153-
- Inspect \`📋 Console Output\` window for correctness!
154+
- Read the requirements written as comments in the code.
155+
- Implement the required logic.
156+
- Click `Run Code` and inspect `📋 Console Output` window for correctness!
157+
- Click `Run Tests`and ensure that test(s) related to this specific exercise are passing <span class="mtk8"> Passing test will show in green text.</span>
158+
159+
🚧 *Some tests for future exercises may fail at first — that’s expected. As you complete each exercise, those tests will start passing. By the time you finish the final exercise, all tests in the test suite should pass.*
154160

155161
---
156162

@@ -226,9 +232,12 @@ console.log(orders); // ["Second"]
226232
// ==============================
227233
```
228234

229-
- Implement the required logic
230-
- Click \`Run Code\`
231-
- Inspect \`📋 Console Output\` window for correctness!
235+
- Read the requirements written as comments in the code.
236+
- Implement the required logic.
237+
- Click `Run Code` and inspect `📋 Console Output` window for correctness!
238+
- Click `Run Tests`and ensure that test(s) related to this specific exercise are passing <span class="mtk8"> Passing test will show in green text.</span>
239+
240+
🚧 *Some tests for future exercises may fail at first — that’s expected. As you complete each exercise, those tests will start passing. By the time you finish the final exercise, all tests in the test suite should pass.*
232241

233242
---
234243

@@ -304,9 +313,12 @@ processOrderQueue(mayasQueue);
304313
// ==============================
305314
```
306315

307-
- Implement the required logic
308-
- Click \`Run Code\`
309-
- Inspect \`📋 Console Output\` window for correctness!
316+
- Read the requirements written as comments in the code.
317+
- Implement the required logic.
318+
- Click `Run Code` and inspect `📋 Console Output` window for correctness!
319+
- Click `Run Tests`and ensure that test(s) related to this specific exercise are passing <span class="mtk8"> Passing test will show in green text.</span>
320+
321+
🚧 *Some tests for future exercises may fail at first — that’s expected. As you complete each exercise, those tests will start passing. By the time you finish the final exercise, all tests in the test suite should pass.*
310322

311323
---
312324

src/sections/04-arrays-and-two-pointers/02-arrays-intro/starterCode.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// ==============================
33
// Exercise 1: Help Maya Add Multiple Orders
44
// ==============================
5-
// Uncomment this block and click "Run Code" to complete the exercise
65
// Task: Create a function \`addOrders\` that helps Maya add multiple orders to her array
76
// The function should add: "Flat White", "Cold Brew", "Double Espresso"
87

@@ -18,7 +17,6 @@
1817
// ==============================
1918
// Exercise 2: Handle Priority Orders During Rush
2019
// ==============================
21-
// Uncomment this block and click "Run Code" to complete the exercise
2220
// Task: Help Maya insert two VIP orders at the front of her queue
2321
// Insert "VIP: Affogato" and "VIP: Cortado" at positions 0 and 1
2422

@@ -32,7 +30,6 @@
3230
// ==============================
3331
// Exercise 3: Fix Multiple Order Mistakes
3432
// ==============================
35-
// Uncomment this block and click "Run Code" to complete the exercise
3633
// Task: Maya made some mistakes! Help her fix them:
3734
// 1. Remove the two incorrect orders at indices 2 and 3
3835
// 2. Update the first order from "Latter" to "Latte"
@@ -46,7 +43,6 @@
4643
// ==============================
4744
// Exercise 4: Create an Efficient Order Processing System
4845
// ==============================
49-
// Uncomment this block and click "Run Code" to complete the exercise
5046
// Task: Help Maya create a function that processes orders and shows progress
5147
// The function should loop through all orders and print each one with its position
5248

src/sections/04-arrays-and-two-pointers/03-array-core-operations/index.md

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,13 @@ function findSongByTitle(setlist, title) {
6565
// Exercise 1: Help Alex Access Songs by Position
6666
// ==============================
6767
```
68+
- Read the requirements written as comments in the code.
69+
- Implement the required logic.
70+
- Click `Run Code` and inspect `📋 Console Output` window for correctness!
71+
- Click `Run Tests`and ensure that test(s) related to this specific exercise are passing <span class="mtk8"> Passing test will show in green text.</span>
72+
73+
🚧 *Some tests for future exercises may fail at first — that’s expected. As you complete each exercise, those tests will start passing. By the time you finish the final exercise, all tests in the test suite should pass.*
6874

69-
- Implement the required logic
70-
- Click `Run Code`
71-
- Inspect `📋 Console Output` window for correctness!
7275

7376
---
7477

@@ -142,16 +145,19 @@ console.log(customSet);
142145

143146
---
144147
## ⏱️ **Alex's Rehearsal Challenge!**
145-
- 🔓 Uncomment this block and click "Run Code" to complete the exercise:
148+
- 🔓 Uncomment the below code section in the editor 👉:
146149
```js
147150
// ==============================
148151
// Exercise 2: Help Alex Update Their Setlist
149152
// ==============================
150153
```
151154

152-
- Implement the required logic
153-
- Click `Run Code`
154-
- Inspect `📋 Console Output` window for correctness!
155+
- Read the requirements written as comments in the code.
156+
- Implement the required logic.
157+
- Click `Run Code` and inspect `📋 Console Output` window for correctness!
158+
- Click `Run Tests`and ensure that test(s) related to this specific exercise are passing <span class="mtk8"> Passing test will show in green text.</span>
159+
160+
🚧 *Some tests for future exercises may fail at first — that’s expected. As you complete each exercise, those tests will start passing. By the time you finish the final exercise, all tests in the test suite should pass.*
155161

156162
---
157163

@@ -268,16 +274,18 @@ function carefulSongManagement() {
268274

269275
---
270276
## ⏱️ **Alex's Performance Challenge!**
271-
- 🔓 Uncomment this block and click "Run Code" to complete the exercise:
277+
- 🔓 Uncomment the below code section in the editor 👉:
272278
```js
273279
// ==============================
274280
// Exercise 3: Help Alex Add Songs Strategically
275281
// ==============================
276282
```
283+
- Read the requirements written as comments in the code.
284+
- Implement the required logic.
285+
- Click `Run Code` and inspect `📋 Console Output` window for correctness!
286+
- Click `Run Tests`and ensure that test(s) related to this specific exercise are passing <span class="mtk8"> Passing test will show in green text.</span>
277287

278-
- Implement the required logic
279-
- Click `Run Code`
280-
- Inspect `📋 Console Output` window for correctness!
288+
🚧 *Some tests for future exercises may fail at first — that’s expected. As you complete each exercise, those tests will start passing. By the time you finish the final exercise, all tests in the test suite should pass.*
281289

282290
---
283291

@@ -398,16 +406,19 @@ console.log("Quick edits for efficiency, careful edits for artistry!");
398406

399407
---
400408
## ⏱️ **Alex's Late Night Challenge!**
401-
- 🔓 Uncomment this block and click "Run Code" to complete the exercise:
409+
- 🔓 Uncomment the below code section in the editor 👉:
402410
```js
403411
// ==============================
404412
// Exercise 4: Help Alex Remove Songs Strategically
405413
// ==============================
406414
```
407415

408-
- Implement the required logic
409-
- Click `Run Code`
410-
- Inspect `📋 Console Output` window for correctness!
416+
- Read the requirements written as comments in the code.
417+
- Implement the required logic.
418+
- Click `Run Code` and inspect `📋 Console Output` window for correctness!
419+
- Click `Run Tests`and ensure that test(s) related to this specific exercise are passing <span class="mtk8"> Passing test will show in green text.</span>
420+
421+
🚧 *Some tests for future exercises may fail at first — that’s expected. As you complete each exercise, those tests will start passing. By the time you finish the final exercise, all tests in the test suite should pass.*
411422

412423
---
413424

@@ -550,16 +561,18 @@ console.log("Random inspiration:", alexsFinder.getRandomSong());
550561

551562
---
552563
## ⏱️ **Alex's Encore Challenge!**
553-
- 🔓 Uncomment this block and click "Run Code" to complete the exercise:
564+
- 🔓 Uncomment the below code section in the editor 👉:
554565
```js
555566
// ==============================
556567
// Exercise 5: Help Alex Find Songs for Requests
557568
// ==============================
558569
```
570+
- Read the requirements written as comments in the code.
571+
- Implement the required logic.
572+
- Click `Run Code` and inspect `📋 Console Output` window for correctness!
573+
- Click `Run Tests`and ensure that test(s) related to this specific exercise are passing <span class="mtk8"> Passing test will show in green text.</span>
559574

560-
- Implement the required logic
561-
- Click `Run Code`
562-
- Inspect `📋 Console Output` window for correctness!
575+
🚧 *Some tests for future exercises may fail at first — that’s expected. As you complete each exercise, those tests will start passing. By the time you finish the final exercise, all tests in the test suite should pass.*
563576

564577
---
565578

@@ -615,14 +628,4 @@ const song = setlist.find(s => s.mood === "romantic"); // Find by criteria
615628
3. **Design your setlist structure** to favor the operations you'll use most frequently
616629
4. **Batch similar operations** when possible to minimize disruption
617630

618-
### 🌟 **From Street Musician to Array Expert**
619-
620-
Alex started the evening as a talented musician with a disorganized approach to setlist management. By the end of the night, they've not only delivered an amazing performance but also mastered the four core array operations that form the foundation of efficient programming.
621-
622-
"The beautiful thing," Alex tells Marcus while settling up for the night, "is that these same principles apply whether you're managing songs, customer orders, inventory items, or any other collection of data. Once you understand access, update, add, and remove operations - and their performance characteristics - you can efficiently manage any array-based system."
623-
624-
Marcus nods approvingly, "Same time next week?"
625-
626-
Alex grins, slinging their guitar over their shoulder, "Absolutely. I've got some new songs to add to my repertoire - and I know exactly where to put them in my setlist for maximum impact!"
627-
628631
*Ready for the next challenge? Let's see how Alex uses these core operations to master advanced array methods and create even more sophisticated musical experiences...*

0 commit comments

Comments
 (0)