volny.petr
BAN USER
My solution in Javascript. The idea is to iteratively fetch an object and combine it with all the sets that are already in the superset being created:
function powerset(array) {
var i, j, len,
powerset = [[]];
for (i=0; i<array.length; i++) {
for (j=0, len=powerset.length; j<len; j++) {
powerset.push(powerset[j].concat(array[i]));
}
}
return powerset;
}
RepI am 27 year old. I am from Toro, United states. I work in Jacobs as Mechanical drafter. I love ...
Repemilymross903, Area Sales Manager at ASAPInfosystemsPvtLtd
Hello, I am Emily and I live in Liberty. I am working as Fitness trainers and I instructors lead, instruct ...
Repcarlaapepin, Area Sales Manager at Atmel
Hello, I am Carla and I live in San Bernardino, USA. I am working as a bookkeeper in a library ...
Repbarrybzane, AT&T Customer service email at ASU
By Profession, I am a Child protective services social worker in Newark USA. My strong interest is in yoga. My ...
RepI believe in magic, power, aliens, parallel universe, god. I always dream about the powers and out of the world ...
Repkathimhoke, Product Security Engineer at Argus
Hi, I am Kathi from Mineola. I am working as an Identification clerk in a Tradewell company. I spent over ...
RepI am from london. I am 27 year old. I work in a balanced fortune as a personal care aide ...
Javascript solution inspired by @showell30 comment:
Output should be: 904
- volny.petr March 10, 2013