Search
⌘K

Leetcode 2630. Memoize II

Implement memoize(fn) that returns a memoized version of any-arity function which caches results keyed by argument identity (strict === equality), so repeated calls with the exact same argument references return the cached value without invoking fn; given a sequence of input tuples, report each call's returned value and the cumulative number of actual fn invocations.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.