Skip to content

Uses backtracking (DFS-style traversal) to explore all character arrangements from the input string. Tracks each recursion depth (tree level) and stores the generated paths. After recursion, it removes duplicates at each level and returns the count of all unique character paths (not just full permutations).

Notifications You must be signed in to change notification settings

fawredd/faw-string-permutations

Repository files navigation

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

About

Uses backtracking (DFS-style traversal) to explore all character arrangements from the input string. Tracks each recursion depth (tree level) and stores the generated paths. After recursion, it removes duplicates at each level and returns the count of all unique character paths (not just full permutations).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published