Describe a Data Structure that uses get,set and setAll in O(1) time.
Anónimo
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.