implement set all in o(1)
Anonimo
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.