Get Query Answers
Implement a prototype of a simple cache query handler.
There are n entries stored in the cache. Each entry is of the form {timestamp, key, value}, where time stamp represents the time at which the entry was stored in the cache entry, and value represents the data value of the entry, an integer represented as string. The keys assigned to the cache entries may not be unique. The cache query handler receives q query requests, where each query is of the form {key, timestamp}, where key represents the ID of the query entry to find, and timestamp represents the time the enry was added.
Given 2 2d arr of strings, cache_entries, and queries, of sizes n X 3 and q X 2 respectively, return an arr of size q with the data values for each query.
Complete the function getQueryAnswers in the editor.
getQueryAnswers has the following parameters:
string cache_entries[n][3]: the cache data entriesstring queries[q][2]: the queries
Returns
int[q]: the answers to the queries
1Example 1
2Example 2

Constraints
Limits and guarantees your solution can rely on.