Tap here to switch tabs
Problem
Submissions

Problem: Max Difference Between Adjacent Circular Array Elements

Max Difference Between Adjacent Circular Array Elements asks you to return the largest absolute difference between neighboring values in a circular integer array, including the first and last values.

Statement

Given a circular array of integers nums, return the maximum absolute difference between any two adjacent elements.

Note: In a circular array, the first element and the last element are considered adjacent.

Constraints:

  • 2≤2 \leq nums.length ≤100\leq 100

  • −100≤-100 \leq nums[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Max Difference Between Adjacent Circular Array Elements

Max Difference Between Adjacent Circular Array Elements asks you to return the largest absolute difference between neighboring values in a circular integer array, including the first and last values.

Statement

Given a circular array of integers nums, return the maximum absolute difference between any two adjacent elements.

Note: In a circular array, the first element and the last element are considered adjacent.

Constraints:

  • 2≤2 \leq nums.length ≤100\leq 100

  • −100≤-100 \leq nums[i] ≤100\leq 100