Your data is a long sequence of numbers separated by commas, represented as a string.
We need to get some information from this string. Specifically, you need to answer 3 questions:
- What is the maxiumum value?
- What is the position (index) of the maximum value?
- What is the mode (most common value) of the data? If there's more than one mode, give the largest value.
Here is some example input:
2, -5, 4, 4, 9, 1, 1, -2, 10, 1, 4, 9
And the answers to the 3 questions:
- The maximum value is 10
- The position of the maximum value is 8
- The modes are 1 and 4; the greatest of these is 4