Skip to content

Instantly share code, notes, and snippets.

View Khatybov's full-sized avatar

Igor Khatybov Khatybov

View GitHub Profile
@Khatybov
Khatybov / perms.js
Last active March 25, 2016 14:32
Find permutations for string for JavaScript. Using Johnson Trotter Algorithm
/**
* Perms === permutations
* Perm === permutation
* */
/**
* Find perms for string
* It uses Johnson Trotter Algorithm
* {@link https://en.wikipedia.org/wiki/Steinhaus–Johnson–Trotter_algorithm Wiki}
*