Design a data structure, for example an array or map of values, that supports get(i), set(i, v) and set_all(v), where set_all assigns v to every element, all in O(1) time.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.