Drop It

From the FreeCodeCamp intermediate algorithms here: Given the array arr, iterate through and remove each element starting from the first element (the 0 index) until the function func returns true when the iterated element is passed through it. Then return the rest of the array once the condition is satisfied, otherwise, arr should be returned as an empty array. FreeCodeCamp – DropContinue reading “Drop It”

Sorted Union

From the FreeCodeCamp intermediate algorithms here: Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays. In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.Continue reading “Sorted Union”

Create your website at WordPress.com
Get started