Max Difference Easy

+50 PTS

Before you start the test, check out our tutorial challenge

  • TYPE CODE PRACTICE CHALLENGE
  • LANGUAGES JAVASCRIPT, PHP, PYTHON, PYTHON2 AND 3 MORE
    LANGUAGES JAVASCRIPT, PHP, PYTHON, PYTHON2, RUBY, SWIFT, TYPESCRIPT
  • TIME ~10MIN

Max Difference

Challenge outline

Hello and welcome to the challenge!


Write a code that finds the max difference between two successive elements of the given array after sorting.

Examples

  • solve([1,2,5,11,3]) -> 6

Input

  • an array with integer numbers

Output

  • the max difference between elements properly found

Constraints

  • 0 < length of the given array < 100


You can solve this programming contest in Ruby, JavaScript, Python and many other languages. If you want, you can also take part in other October 2019 competitions. Below you can find some of them:



Have fun and good luck! :)