Build Set class with following methods: get(key), set(key, val), clear. Each of the methods time and space complexity has to be O(1). Also Clear method is not allowed to erase the internal memory object of the Class by reassigning its value to an empty one,
Sigiloso
Hint: use timestamps instead when Set method will define TS for the first time, Get will retrieve value by a key and TS set lower than the current one and Clear method will update TS to current year + 100 years ahead.