Skip to content

Basic javascript file for generating all permutations and alphabetic anagrams

Notifications You must be signed in to change notification settings

AndrewKhassapov/js_anagrams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

js_anagrams

permutations and anagrams

permutations.js is a simple javascript file used for generating all permutations of a given array, and all anagrams of a given string.

Installation

No installation necessary.

Usage

anagrams("PIE"); // Returns ["PIE", "PEI", "IPE", "IEP", "EPI", "EIP"]

permutations(123); // Returns [["1", "2", "3"], ["1", "3", "2"], ["2", "1", "3"], ["2", "3", "1"], ["3", "1", "2"], ["3", "2", "1"]]

Contributing

Additional functions and optimization always welcome.

License

Free to use.

About

Basic javascript file for generating all permutations and alphabetic anagrams

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published