Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 720 Bytes

description.md

File metadata and controls

24 lines (14 loc) · 720 Bytes

Demo

⚠️ This is a demo problem aimed at developers wishing to create kata.

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:

  1. What is the maxiumum value?
  2. What is the position (index) of the maximum value?
  3. What is the mode (most common value) of the data? If there's more than one mode, give the largest value.

Example

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