I hereby claim:
- I am mesterum on github.
- I am mihaimanole (https://keybase.io/mihaimanole) on keybase.
- I have a public key ASDHxu9Z4qZpk6-ewRgIF4dQRTH0zhWcQ7o7zqP9xyEZFwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function permAlone(str) { | |
if(str=='') return 1 | |
const bag=new Map() | |
for(const c of str){ | |
bag.set(c,(bag.get(c)||0)+1) | |
} | |
const essence=[] | |
for(let v of bag.values()){ | |
essence[--v]=(essence[v]||0)+1 | |
} |