Develop an algorithm for the 4-sum problem. Solution The algorithm requires creating another array TWOSUMS which has the sum of all possible pair of numbers in the array. We also need to store the index of numbers along with the sum to keep track that the numbers are distinct. Here’s how each entry in the TWOSUMS array will be stored. class Entry{ int sum; int indexa; int indexb; } Entry TWOSUMS[]; Algorithm.