@dxzmpk/js-algorithms-data-structures
Version:
Algorithms and data-structures implemented on JavaScript
22 lines (19 loc) • 383 B
JavaScript
import bwPowerSet from '../bwPowerSet';
describe('bwPowerSet', () => {
it('should calculate power set of given set using bitwise approach', () => {
expect(bwPowerSet([1])).toEqual([
[],
[ ],
]);
expect(bwPowerSet([1, 2, 3])).toEqual([
[],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
]);
});
});