Algorithm · Waymo · Easy
Implement a function solution(values) that computes the arithmetic mean of a flat list of numbers. The mean is obtained by adding up every element and then dividing that total by the count of elements. If the supplied list holds no elements at all, the function must yield 0 instead of performing a division. The caller's list has to be left exactly as it was — no in-place edits of any kind are permitted. Example 1: Explanation: The elements add up to 18 across 3 entries, so…
Checking your access…