Given an array of integers
numsand an integerk, an elementnums[i]is considered good if it is strictly greater than the elements at indicesi - kandi + k(if those indices exist). If neither of these indices exists,nums[i]is still considered good.Return the sum of all the good elements in the array.
1 | package main |