Arithmetic Slices 2
1. You are given an array(arr) of integers. 2. You have to find the count of arithmetic slices in the given array. 3. Arithmetic slice is defined as the sub-sequence of an array having all its elements in A.P and length of sub-sequence should be greater than or equal to 3.
1 <= N <= 1000 -10^8 <= arr[i] <= 10^8
A number N arr1 arr2.. N numbers
Check the sample output and question video.
4 1 2 3 4