Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • If the input were {4, 5, -8, 3, 11, -21, 6} the result should be 11
  • An empty array should throw an exception
  • A single item array should return the single item
  • If several numbers are equal and highest, only one should be returned
  • If the input were {7, 13}  then the result should be 13
  • If the input were {13, 4}  then the result should be 13

Trainers see the solution here