C++ Sliding-Window Mean of a Float Array With Inf, -Inf and NaN Handling

Read the full interview experience this question came from →

Quick Overview

Compute the mean of every fixed-size sliding window over a C++ float array that may contain inf, -inf and NaN. It tests IEEE-754 semantics for special values, an O(n) running computation that one bad value cannot permanently corrupt, and numerical robustness against overflow, cancellation and aggressive compiler flags.

C++ Sliding-Window Mean of a Float Array With Inf, -Inf and NaN Handling

Company: Headlands

Role: Data Scientist

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Online Assessment

Overview: Compute the mean of every fixed-size sliding window over a C++ float array that may contain inf, -inf and NaN. It tests IEEE-754 semantics for special values, an O(n) running computation that one bad value cannot permanently corrupt, and numerical robustness against overflow, cancellation and aggressive compiler flags.

Read the full Headlands Data Scientist interview experience this question came from

Headlands logo
Headlands
Aug 30, 2026
mediumData ScientistOnline AssessmentSoftware Engineering Fundamentals
5
0
Loading...