Pergunta de entrevista da empresa SAP

Describe a Data Structure that uses get,set and setAll in O(1) time.

Resposta da entrevista

Sigiloso

13 de jul. de 2022

Use a Hashmap, use a global variable when you call setAll. The catch is to have a global timer, so you know if the value in the map is relevant or the global value is relevant.