Microsoft interview question

implement set all in o(1)

Interview Answer

Anonymous

Feb 17, 2019

used external variable for the set all, and also used counter to check if I need to use the set all value or not. It was correct but a better way is to use time object instead of counter. There are solutions for that in stackoverflow.