-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I have a working version of merge sort in the code, commented out currently. I say that it is working, because if you console log the results of the div max-width properties you will see that they were indeed sorted, yet the visualization does not work. I previously attempted to create a copy of the array of divs to pass into merge sort, so that original array can just be used to show the visualization while the copied passed version will be used by the algorithm for logic. This was unsuccessful for all my attempts, but I have not come back to it in a bit now. If anyone wants to give it a shot please feel free.
Code is found at the bottom of main.js, currently commented out.
Side note: I am aware that Javascript will only pass a reference pointer when doing something like the following:
let a = [];
let b = a;
I tried the following:
let a = [];
let b = [...a];