🎁 Exclusive Offer! Join our
Telegram Channel
to get **special discounts** and updates! 🚀
Question 62 - 100% Working Solution | Buy Now
Description
2 Live
getQueryAnswers
In a machine learning model, there are n data entries stored in the model's output cache cacheEntries. Each entry contains three values:
1. timestamp – when the prediction was made.
2. modelId – the identifier of the machine learning model.
3. predictionValue – the model's output, represented as a string containing an integer.
A query handler receives q queries in the form of queries[q][2], where each query consists of:
- modelId – identifying the machine learning model.
- timestamp – specifying the time at which the prediction was made.
Implement a function getQueryAnswers that:
- Takes two inputs:
- cacheEntries[n][3]: A list of cached predictions.
- queries[q][2]: A list of queries.
- Returns an array of integers, where each value corresponds to the predictionValue for the given modelId and timestamp.