JAVA
PART ONE;
Given a linked list of integers, write a method that computesand prints the prefix sums which is illustrated below with anexample. If the array list has values 5,3,2,9,3,15,22 from head totail, the prefix sums would be 5, 8, 10, 19, 22, 37,59 which is thesum of the first k values where k=0, 1,2,.. size()-1. You willoutput the prefix sums exactly as above on a single line, commaseparated. Make sure your code works for a linked list of any size,not just for the example above. 7.
PART TWO;
Same as above, except you compute the prefix-sums of the reverseof the list. For
PayPal Gateway not configured
PayPal Gateway not configured