Number of Distinct Averages Problem

Number of Distinct Averages Problem — ExecCode Easy DSA Practice

Solve the Number of Distinct Averages problem on ExecCode. Free online easy DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.

Description You are given a 0-indexed integer array nums of even length. As long as nums is not empty, you must repetitively: Find the minimum number in nums and remove it. Find the maximum number in nums and remove it. Calculate the average of the two removed numbers. The avera…

Practice Number of Distinct Averages free on ExecCode. Browse more ExecCode DSA problems.