You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// iterate through the array, keep incrementing count whenever diff is same. If diff mismatch, calculate answer [ n*(n+1)/2 ] if count >= 3 and reset count variable to 2. Continue the process untill array end reached. After loop once again perform the same operation for calculating answer of the remaining count variable value.