Write a memoize(fn) higher-order function that caches results for the same inputs.
Unlock detailed company stats for this questionUpgrade
Same inputs must return the cached result without recomputing. Example: const memoAdd = memoize((a, b) => a + b); memoAdd(1, 2) computes 3, a second memoAdd(1, 2) is a cache hit.
Format · Agoda HackerRank OA.
Community answers
No answers contributed by the community yet.
Related courses

Course

