Back to problems

Filter Numbers Greater Than the Average

Algorithm · Squarepoint · Easy

Given a list of n integers, compute the average of all elements and return a new list containing only the elements that are strictly greater than the average. Preserve their original relative order. Function Signature Input Format nums is a list containing exactly n integers, where n = len(nums). Output Format Return a list with every element strictly greater than the average, in the same order as in nums. If no such element exists, return an empty list. Constraints 1 <= n…

Checking your access…