An open API service indexing awesome lists of open source software.

https://github.com/fawredd/faw-string-permutations

This function takes a string and generates all possible arrangements (permutations) of its characters. It considers all substrings, from single characters to the entire string.
https://github.com/fawredd/faw-string-permutations

Last synced: 4 months ago
JSON representation

This function takes a string and generates all possible arrangements (permutations) of its characters. It considers all substrings, from single characters to the entire string.

Awesome Lists containing this project

README

          

Given a string, make a function that returns the number of posible character combinations.
INPUT: "CCB"
OUTPUT: 8

8 is the result of theese combinations:
C, B, CC, CB, BC, CCB, CBC, BCC

#javascript #dfs #backtrack #permute #permutation #filter