Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Open more actions menu

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.