Verkada·Software Engineer·Technical Phone Screen
- Given N cameras each with a list of timestamped motion readings and a threshold T, compute all time intervals where every camera is simultaneously active. A camera is active when consecutive readings above the threshold form a continuous interval.
- Follow-up: what are the time and space complexities of your solution, where is the bottleneck, and how would you redesign it to handle thousands of cameras with high data volume, for example using streaming, pre-aggregation, or interval indexing?
“The per-camera part wasn't bad once I remembered to group consecutive active readings into intervals rather than treating each reading independently.”