What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-19 13:19:07
powerset javascript examples
const set = ['x', 'y', 'z']; const powerSet = (arr = []) => { const res = []; const { length } = arr; const numberOfCombinations = 2 ** length; for (let combinationIndex = 0; combinationIndex < num... Add solution -
C++ 2021-10-01 00:45:02
print all unique subsets
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Function to print the elements of a vector void printVector(vector<int> const &out) { for (int i: out) &nbs... Add solution