Uber·Software Engineer·Technical Phone Screen
- Design a VisitorLog class that supports recording (name, timestamp) entries and querying which visitors have been seen exactly once up to a given timestamp.
- How does your solution change if records can arrive out of timestamp order?
- What if the visit count is restricted to a sliding time window instead of all records up to a timestamp?
“I jumped straight to a hashmap of name to count and felt pretty good about it.”