mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): remove first person language from merge sort JS workshop (#67401)
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ The merge sort algorithm performs three actions:
|
|||||||
- Sort the items in the sub-parts
|
- Sort the items in the sub-parts
|
||||||
- Merge the sorted sub-parts
|
- Merge the sorted sub-parts
|
||||||
|
|
||||||
The above happens recursively until the sub-parts are merged into the complete sorted sequence. Let's start by dividing the sequence.
|
The above happens recursively until the sub-parts are merged into the complete sorted sequence. Start by dividing the sequence.
|
||||||
|
|
||||||
First, inside the `mergeSort` function, declare a variable `middlePoint` using `const` and assign it `Math.floor(array.length / 2)` so you can split the sequence in half before recursing.
|
First, inside the `mergeSort` function, declare a variable `middlePoint` using `const` and assign it `Math.floor(array.length / 2)` so you can split the sequence in half before recursing.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user