algorithms-with-es6
algorithms-with-es6 copied to clipboard
Fixed a couple bugs.
Given-sum would allow a number to pair with itself. Using the same data structures, I stored a flag to see whether a number occurs twice.
Remove-from-array would produce wrong results given a value matched multiple times in a row. The splicing of the array would step over a value.