FastPrepSliding Window Average (Meta Canada, E4/E5 :)
Problems/Sliding Window Average (Meta Canada, E4/E5 :)

Sliding Window Average (Meta Canada, E4/E5 :)

Meta logoMeta● EasyFULLTIMEPHONE SCREENONSITE INTERVIEW

Updated Oct 2026

QuestionFunctionExamplesConstraints

Problem statement

Given an integer array as input and a window size, find the sliding window average.

Follow up: Design an API to return the sliding average, if input is given as a stream instead. Moving Average from Data Stream (This seems to be a LC question :)

Function

slidingWindowAverage(nums: int[], windowSize: int) → double[]

Examples

Example 1

nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]windowSize = 7return = [4.0, 5.0, 6.0]

KEEP SMILING :))

Constraints

  • nums.length >= 1
  • 1 <= windowSize <= nums.length
  • The result contains exactly nums.length - windowSize + 1 averages, one for each contiguous window.

More Meta Phone Screen questions

  • Convert a Sorted Linked List to a Balanced BSTPHONE SCREEN · Seen Nov 2026
  • Fuzzy Word Lookup With One Misspelled LetterPHONE SCREEN · Seen Nov 2026
  • Multi-Head Attention Forward PassPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Run-Length Encoded Vector Dot ProductPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Mutual-Friend RecommendationsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Best Time to Buy and Sell StockPHONE SCREEN · Seen Nov 2026
  • First Element Greater Than KPHONE SCREEN · Seen Nov 2026
  • Count Events in Rolling Minute WindowsPHONE SCREEN · Seen Oct 2026
  • Valid Word AbbreviationPHONE SCREEN · Seen Oct 2026
  • Shortest Path in a Binary MatrixPHONE SCREEN · Seen Sep 2026

Similar questions at other companies

  • Moving Average of a Data StreamSquarepoint Capital · PHONE SCREENSquarepoint Capital interview questions
  • Bad Request AlertsMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Fixed-Window Rolling MeanJump Trading · ONSITE INTERVIEWJump Trading interview questions
  • Maximum Earnings Across WarehousesAmazon · ONSITE INTERVIEW
  • Shortest Subarray with Sum at Least KOracle · ONSITE INTERVIEWOracle interview questions
  • Longest Subarray Within an Absolute-Difference LimitGoogle · ONSITE INTERVIEWGoogle interview questions
  • Longest Continuous Subarray Within an Absolute-Difference LimitUber · ONSITE INTERVIEWUber interview questions
  • Disk Space Window AnalyzerAgoda · PHONE SCREENAgoda interview questions
  • Sliding Window MaximumGroww · PHONE SCREEN
  • Sliding-Window Rate LimiterSnowflake · ONSITE INTERVIEWSnowflake interview questions

Meta interview experiences

  • Meta PhD SWE Intern AI Coding Phone Screen: 1 Experience
  • Meta Business Support Engineer Phone Screen: 1 Experience
  • Meta Software Engineer Onsite Questions: 3 Experiences
  • Meta AI Native Engineer OA and Onsite: 1 Experience
  • Meta AI-Native Coding Interview: 3 Experiences
  • Meta Production Engineer Intern Questions: 6 Experiences
All Meta interview questionsSee Meta hiring insights
Saved
class Solution {
    public double[] slidingWindowAverage(int[] nums, int windowSize) {
      // write your code here
    }

}
Checking account…