← HALL

Object Key Memoizer Collision

HARD
+500 XP REWARD ⏱ Limit: 15m
// MISSION BRIEFING //

ANOMALY DESCRIPTION

A memoization wrapper casts arguments to string by key = args[0], which turns all objects into '[object Object]', causing different object inputs to return cached collision values! Fix key generation using JSON.stringify.

SPECIFICATION SUITE

Object uniqueness
Input: memoize(x => x.val)
Expected: function
Multiple arguments [PROTECTED TEST]
Evaluation logic hidden to prevent hardcoding.

RADAR HINTS

Hint #1 (Click to decrypt)

Set const key = JSON.stringify(args) to avoid object string coercion collision.

solution.js UTF-8 • JAVASCRIPT
STATIC ANALYSIS CONSOLE Ready for dispatch

Press "VERIFY & SUBMIT" or Ctrl+Enter to evaluate your patch.