FastPrepAverage or Zero
Problems/Average or Zero

Average or Zero

Waymo logoWaymo● EasyFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamples

Problem statement

Source note: The report gives the function name, the mean rule, and the rule for empty input. It leaves out how numbers are represented, examples, and numeric limits. Our version is about 98% the same as the reported question.

Given a numeric array table, return its arithmetic mean.

The arithmetic mean is the sum of all values divided by the number of values. If table is empty, return 0.

Function

average(table: double[]) → double

Examples

Example 1

table = [2,4,6,8]return = 5.0

The values sum to 20. Dividing by the 4 values gives 5.

Example 2

table = []return = 0.0

The input is empty, so the required result is 0.

Example 3

table = [-1.5,2.5,5]return = 2.0

The values sum to 6. Dividing by the 3 values gives 2.

More Waymo interview questions

  • 2D Convolution Layer Forward PassPHONE SCREEN · Seen Dec 2026
  • Multi-Head Attention Forward PassPHONE SCREEN · Seen Dec 2026
  • Numerically Stable SoftmaxPHONE SCREEN · Seen Dec 2026
  • Shortest Travel Time in a Grid with Traffic LightsPHONE SCREEN · Seen Nov 2026
  • Fixed-Order Task Run Time With CooldownPHONE SCREEN · Seen Oct 2026
  • Reorderable Task Scheduler With CooldownPHONE SCREEN · Seen Oct 2026
  • Island Area and Water BoundaryPHONE SCREEN · Seen Sep 2026
  • Linked Perception HistoryONSITE INTERVIEW · Seen Sep 2026
  • Vehicle Maintenance Event ReadinessPHONE SCREEN · Seen Sep 2026
  • Dictionary Matches from Repeated LettersONSITE INTERVIEW · Seen Sep 2026

Similar questions at other companies

  • Picked Player Who LostSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
  • Total Cost Against the Lowest Earlier PricePayPal · OAPayPal interview questions
  • Count Valid Square PairsAuxoAI · OA
  • Server InvestmentRippling · OARippling interview questions
  • Basic Item DiscountsPalantir · OAPalantir interview questions
  • Next Pascal Row CoefficientIntuit · OAIntuit interview questions
  • Unique Integers That Sum to ZeroNVIDIA · OANVIDIA interview questions
  • Count Multiples of Three with Two SevensHudson River Trading · OAHudson River Trading interview questions
  • Diagonal Bounce TraversalAutodesk · OAAutodesk interview questions
  • Maximum Student-Teacher DistanceChubb · OAChubb interview questions

Waymo interview experiences

  • Waymo New Grad MLE Phone Screen: Traffic Lights: 1 Experience
All Waymo interview questionsSee Waymo hiring insights
Saved
class Solution {
    public double average(double[] table) {
      // Write your code here.
    }
}
Checking account…