add solution to problem 18. Using FP black magic. The reduce function will generate n vectors from size 1 to size n. So, if n is large, the gc will kick in thus observe performance degradation. The three cases pattern matching may not be necessary if we can calculate the left-most and right-most first.
add solution to problem 18. Using FP black magic. The reduce function will
generate n vectors from size 1 to size n. So, if n is large, the gc will kick
in thus observe performance degradation. The three cases pattern matching may
not be necessary if we can calculate the left-most and right-most first.

advancedxy/hackerrank,advancedxy/hackerrank,advancedxy/hackerrank