Question: Create a function that accepts HashMap with Key of String and Value of Int, and returns array with two elements. The first element of the

Create a function that accepts HashMap with Key of String and Value of Int, and returns array with two elements. The first element of the output array is sum of all values of input HashMap and the second one is the average of all numbers. Ex1 : INPUT : "Alex" : 87 , "Ricardo" : 93, "Jeo" : 59] => OUTPUT [239, 79.666] Ex2: INPUT : ["Richard" : 80, "Alex" 100] => OUTPUT [180, 901
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
