0

I realized this algorithm for generating combinations. It works in the following way, if we have in input [A, B, C] combinations will be [A], [B], [C]. [A, B], [A, C], [B, C], [A, B, C]. While if we have in input [1,1,2,3], the combinations will be [1], [2], [3], [4], [1,2], [1,3], [2,3 ], [1,1,2...