Count the number of contiguous subarrays that form an arithmetic sequence.
Constraints
Example
>>> count_arithmetic_slices([1, 2, 3, 4]) 3 >>> count_arithmetic_slices([1]) 0 >>> count_arithmetic_slices([1, 2, 3, 8, 9, 10]) 2
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints