FastPrepCommon Camera Motion Intervals
Problems/Common Camera Motion Intervals

Common Camera Motion Intervals

Verkada logoVerkada● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report backs the threshold periods for a single camera and the follow-up of intersecting all cameras. It does not say how sparse samples connect to each other or give workload limits. Our version uses the longest runs of samples that qualify, and limits the input sizes.

Each camera provides strictly increasing integer timestamps and a motion intensity for every timestamp. For one camera, a motion period is a maximal consecutive run of samples whose intensity is at least threshold; its inclusive interval runs from the first qualifying timestamp through the last.

Return the sorted inclusive intervals during which every camera is simultaneously in one of its motion periods.

Function

commonMotionIntervals(timestamps: int[][], intensities: double[][], threshold: double) → int[][]

Examples

Example 1

timestamps = [[1,2,3,4,5]]intensities = [[0.1,0.7,0.8,0.2,0.9]]threshold = 0.6return = [[2,3],[5,5]]

The qualifying samples form two maximal runs.

Example 2

timestamps = [[1,2,3,4,5],[0,2,3,5,6]]intensities = [[0.8,0.8,0.2,0.9,0.9],[0.1,0.7,0.7,0.7,0.2]]threshold = 0.7return = [[2,2],[4,5]]

Intersecting [1,2] and [4,5] with the second camera's [2,5] gives two common periods.

Constraints

  • 1 <= timestamps.length == intensities.length <= 100
  • 1 <= timestamps[c].length == intensities[c].length
  • The total sample count is at most 200000.
  • Each timestamp row is strictly increasing and values fit in signed 32-bit integers.
  • 0.0 <= intensities[c][i], threshold <= 1.0

More Verkada Phone Screen questions

  • Find the Unique User with Access to Every CameraPHONE SCREEN · Seen Nov 2026
  • Host Log ParserPHONE SCREEN · Seen Sep 2026
  • Valid SudokuPHONE SCREEN · Seen Sep 2026
  • Time-Based Key-Value StorePHONE SCREEN · Seen Aug 2026
  • Camera Log API SequencePHONE SCREEN · Seen Aug 2026
  • Find Valid IP AddressesPHONE SCREEN · Seen Apr 2026

Similar questions at other companies

  • Meeting Rooms IIUber · PHONE SCREENUber interview questions
  • Meeting Rooms IIAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Intersect Two Sorted Interval ListsByteDance · PHONE SCREENByteDance interview questions
  • Meeting Rooms IIWalmart · PHONE SCREENWalmart interview questions
  • Intersect Two Interval ListsSuperhuman · PHONE SCREENSuperhuman interview questions
  • Find Shared Camera Activity PeriodsServal · PHONE SCREEN
  • Earliest Common Meeting SlotAdobe · PHONE SCREENAdobe interview questions
  • Intersections of Two Interval ListsDatadog · PHONE SCREENDatadog interview questions
  • Interval List IntersectionsGoogle · ONSITE INTERVIEWGoogle interview questions
  • Most Employees Working at OnceCitadel · OACitadel interview questions
All Verkada interview questionsSee Verkada hiring insights
Saved
class Solution {
    public int[][] commonMotionIntervals(int[][] timestamps, double[][] intensities, double threshold) {
        // Write your code here
    }
}
Checking account…