The sum of square of auxiliary operators is
Answers
Answered by
0
Answer: Sum of squares of differences between all pairs of an array
Difficulty Level : Hard
Last Updated : 29 Jan, 2022
Given an array arr[] of size N, the task is to compute the sum of squares of differences of all possible pairs.
Input: arr[] = {2, 8, 4}
Output: 56
Explanation: Sum of squared differences of all possible pairs = (2 – 8)2 + (2 – 4)2 + (8 – 4)2 = 56
Input: arr[] = {-5, 8, 9, -4, -3}
Output: 950
Similar questions