Sometimes functions are asked recompute the same value over and over again. Why do all that extra work?
Memoization is here to help!
What is memoization? Memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive functio…