Timed Set (Expiring Set) and How to Test It
Implement a TimedSet, a set whose elements expire, supporting:
ADD x t ttl: at timetadd elementx, which expires at timet+ttl(it is absent when time >= t+ttl); if x already exists, ove...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
