Company: Visa_14feb
Difficulty: medium
Simple Cache Query Handler Problem Description Implement a prototype of a simple cache query handler that manages data entries stored in a cache. Each cache entry has the format: [timestamp, key, value] timestamp : when the entry was stored, in "hh:mm:ss" format. key : an alphanumeric ID (e.g., "a2er5i80"). value : the data value, an integer stored as a string (e.g., "129"). The handler receives queries of the form: [key, timestamp] For each query, you must return the corresponding data value stored in the cache for that exact (key, timestamp) pair. You are given: cache_entries : a 2D array of strings, where each entry is [timestamp, key, value] . queries : a 2D array of strings, where each query is [key, timestamp] . Return an array of integers representing the data values (converted from string to int) for each query. Note: The same key can appear multiple times in the cache with different timestamps. For a given timestamp, a key is unique (no duplicate (timestamp, key) pairs). It is