## Question 1 Given this series of commands, what is the output of the last command? Init() Set Value("prediction", "winning", 3) Get Value("prediction", 2) ### Options 1. "winning" Incorrect ---------------------------- 2. "losing" Incorrect ---------------------------- 3. "" Correct We have not set any value for timestamps earlier than 3, so we return an empty string. ---------------------------- --------------------------------------------- ## Question 2 Given this series of commands, what is the output of the last command? Init() Set Value("prediction", "winning", 3) Set Value("prediction", "losing", 4) Set Value("result", "won", 5) Get Value("prediction", 5) ### Options 1. "winning" Incorrect ---------------------------- 2. "losing" Correct Since the timestamp in the query is more recent than the latest timestamp for this key, we return the value set at the most recent timestamp. ---------------------------- 3. "" Incorrect ---------------------------- 4. "won" Incorrect ---------------------------- --------------------------------------------- ## Question 3 Given this series of commands, what is the output of the _last_ command? Init() Set Value("prediction", "winning", 3) Set Value("prediction", "losing", 4) Get Value("prediction", 3) ### Options 1. "winning" Correct A value exists for the key and timestamp in the query and is returned. ---------------------------- 2. "losing" Incorrect ---------------------------- 3. "" Incorrect ---------------------------- ---------------------------------------------