InterviewDB Experience

Memo Function: Implement a Generic Memoization Wrapper in JavaScript

Interview Experience

Round 1 - Coding (Frontend/JS) Problem Implement a memo function that wraps any pure function and caches its results. The cache key should be derived from the serialized arguments. Support an optional maxSize to limit cache entries (evict least-recently-used when full). Follow-ups Your key serialization uses JSON.stringify. What breaks for functions, circular refs, or undefined args? How do you fix it? Add a maxAge option (in ms) after which a cache entry is considered stale. How would you make…

Full Details

🔒

Unlock all Confluent questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a candidate experience report from a confluent interview during the phone round.

It covers the following topics: Coding, Phone, Frontend, Dynamic Programming .