Given an array of integers, find the maximal absolute difference between any two of its adjacent elements.
Example
For inputArray = [2, 4, 1, 0]
, the output should bearrayMaximalAdjacentDifference(inputArray) = 3
.
Code
function arrayMaximalAdjacentDifference(inputArray) {
}
'알고리즘(CF)' 카테고리의 다른 글
22. avoidObstacles (1) | 2017.06.20 |
---|---|
21. isIPv4Address (1) | 2017.06.19 |
19. areEquallyStrong (1) | 2017.06.18 |
18. palindromeRearranging (1) | 2017.06.17 |
17. arrayChange (1) | 2017.06.17 |