Available question text
Compute, for each index i, the absolute difference between the floor average of the first i+1 elements and the floor average of the remaining elements (treating the average of 0 elements as 0), and return the smallest index with the minimum difference. This is efficiently done by using running prefix sums and the total sum to get prefix/suffix averages in O(n) time.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2256. Minimum Average Difference
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source