Original Post
Hi all I need an alogrithm to help with what seems to be a relatively easy problem. I have array of n elements, and am required to sum all elements against the other in multiple combinations, so that all possible combinations are exhuasted. So array has 3 elements A, B and C. I need: A+B+C A+B A+C B+C Does anyone know of an algorithm that will help with this. The algorithm has to work with all levels of indices, ie a 4 element array A, B, C, D: A+B+C+D A+B A+C A+D B+C B+D C+D A+B+C A+B+D B+C+D...etc Am sure there will be something out there that can help with this.