Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. You are given a list of data entries that represent entries and exits of groups of people into a building. An entry looks like this:
  2.  
  3. {"timestamp": 1526579928, count: 3, "type": "enter"}
  4.  
  5. This means 3 people entered the building. An exit looks like this:
  6.  
  7. {"timestamp": 1526580382, count: 2, "type": "exit"}
  8.  
  9. This means that 2 people exited the building. timestamp is in Unix time.
  10.  
  11. Find the busiest period in the building, that is, the time with the most people in the building. Return it as a pair of (start, end) timestamps. You can assume the building always starts off and ends up empty, i.e. with 0 people inside.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement