PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Meta

Check diagonal and compute window statistics

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of array and matrix manipulation, sliding-window and streaming statistics, and appropriate data-structure choices for maintaining aggregates and order-statistics such as moving averages and sliding-window medians.

  • Medium
  • Meta
  • Coding & Algorithms
  • Machine Learning Engineer

Check diagonal and compute window statistics

Company: Meta

Role: Machine Learning Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

##### Question Given a square matrix, determine whether all elements on its main diagonal are identical. LeetCode 346. Moving Average from Data Stream – design a class that maintains a sliding window of size k over a data stream and returns the current moving average on each insertion. LeetCode 480. Sliding Window Median – for an integer array and window size k, output the median of the numbers inside the window as it slides one position at a time. https://leetcode.com/problems/moving-average-from-data-stream/ https://leetcode.com/problems/sliding-window-median/

Quick Answer: This question evaluates understanding of array and matrix manipulation, sliding-window and streaming statistics, and appropriate data-structure choices for maintaining aggregates and order-statistics such as moving averages and sliding-window medians.

Related Interview Questions

  • Solve Tree Columns And Maze Variants - Meta (medium)
  • Solve a Key-Door Corridor Maze - Meta (medium)
  • Solve Array Merge and Parentheses Cleanup - Meta (medium)
  • Solve Two Backtracking Array Problems - Meta (hard)
  • Solve Maze and Suffix Problems - Meta (medium)
Meta logo
Meta
Aug 4, 2025, 10:55 AM
Machine Learning Engineer
Technical Screen
Coding & Algorithms
6
0
Question

Given a square matrix, determine whether all elements on its main diagonal are identical.

LeetCode 346. Moving Average from Data Stream – design a class that maintains a sliding window of size k over a data stream and returns the current moving average on each insertion.

LeetCode 480. Sliding Window Median – for an integer array and window size k, output the median of the numbers inside the window as it slides one position at a time.

https://leetcode.com/problems/moving-average-from-data-stream/ https://leetcode.com/problems/sliding-window-median/

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Meta•More Machine Learning Engineer•Meta Machine Learning Engineer•Meta Coding & Algorithms•Machine Learning Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.