## 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”

## Missing Letters

From the FreeCodeCamp intermediate algorithms here: Find the missing letter in the passed letter range and return it. If all letters are present in a range, return undefined. FreeCodeCamp – Missing Letters There’s not too much to say about this one. One thing which I can note is that JavaScript, as a language, is extremelyContinue reading “Missing Letters”

## DNA Pairing

From the FreeCodeCamp intermediate algorithms here: The DNA strand is missing the pairing element. Take each character, get its pair, and return the results as a 2d array. Base pairs are a pair of AT and CG. Match the missing element to the provided character. Return the provided character as the first element in each array.Continue reading “DNA Pairing”

## Search & Replace

From the FreeCodeCamp Intermediate Algorithms Challenges, here: Perform a search and replace on the sentence using the arguments provided and return the new sentence. First argument is the sentence to perform the search and replace on. Second argument is the word that you will be replacing (before). Third argument is what you will be replacingContinue reading “Search & Replace”

## Pig Latin – ‘igpay atinlay’

From the FreeCodeCamp Intermediate Algorithms Challenges, here: Translate the provided string to pig latin. Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an “ay”. If a word begins with a vowel you just add “way” to the end. If a wordContinue reading “Pig Latin – ‘igpay atinlay’”

## Spinal Tap Case – spinal-tap-case

From the FreeCodeCamp Intermediate Algorithms Challenges, here: Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes. FreeCodeCamp – Spinal Tap Case Let’s turn it up to eleven! This was a great problem to learn more about RegEx and just how powerful it can be… Surely like most others attempting this problem, I began byContinue reading “Spinal Tap Case – spinal-tap-case”

## Wherefore Art Thou

From the FreeCodeCamp Intermediate Algorithms Challenges, here: Make a function that looks through an array of objects (first argument) and returns an array of all objects that have matching name and value pairs (second argument). Each name and value pair of the source object has to be present in the object from the collection ifContinue reading “Wherefore Art Thou”

## Seek and Destroy

From the FreeCodeCamp Intermediate Algorithms Challenges, here: You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments. Note: You have to use the arguments object. FreeCodeCamp – SeekContinue reading “Seek and Destroy”

## Diff Two Arrays

From the FreeCodeCamp Intermediate Algorithms Challenges: Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays. Note: You can return the array with its elements in any order. FreeCodeCamp – DiffContinue reading “Diff Two Arrays”

## Sum All Numbers in a Range

From the FreeCodeCamp Intermediate Algorithms Challenges: We’ll pass you an array of two numbers. Return the sum of those two numbers plus the sum of all the numbers between them. The lowest number will not always come first. For example, sumAll([4,1]) should return 10 because sum of all the numbers between 1 and 4 (both inclusive) is 10. FreeCodeCampContinue reading “Sum All Numbers in a Range”