Given an array A of integers, find the index of values that satisfy A + B =C + D, where A,B,C & D are integers values in the array. Find all combinations of quadruples.

output all indexes of quadruple into format List<List<Integer>> indexofQuadruples

similar to leetcode 4sum, or has better solution ?