made with esnextbin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var votes = [ | |
'tacos', | |
'pizza', | |
'pizza', | |
'tacos', | |
'fries', | |
'ice cream', | |
'ice cream', | |
'pizza' | |
]; |
I hereby claim:
- I am peterschussheim on github.
- I am peters (https://keybase.io/peters) on keybase.
- I have a public key whose fingerprint is 082D 011E 925D 7FBB 2CF4 D960 63DC 8FBB A640 0A1E
To claim this, I am signing this object:
This Gist was automatically created by Carbide, a free online programming environment.
This Gist was automatically created by Carbide, a free online programming environment.
[You can view a live, interactive version of this Gist here](http://alpha.trycarbide.com/@antimatter15/f2ff5e917d93b48
This Gist was automatically created by Carbide, a free online programming environment.
This Gist was automatically created by Carbide, a free online programming environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function perms(data) { | |
if (!(data instanceof Array)) { | |
throw new TypeError("input data must be an Array"); | |
} | |
data = data.slice(); // make a copy | |
var permutations = [], | |
stack = []; | |
function doPerm() { |
OlderNewer