As name suggest prefix-sum algorithm is used to find the sum of all the elements that are present before to the particular element while suffix-sum technique is used to sum of all elements that are present after the particular element in an array.