algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

Fix powerset algorithm

Open akhramov opened this issue 4 years ago • 0 comments

Since aca7bb1ba6ceb48ced0f7731b72a673880656027 the powerset algorithm produces an array of size N*N instead of 2^N.

This change fixes the bounds of the inner loop. The upper bound should be result.size instead.

akhramov avatar Aug 14 '20 17:08 akhramov