Any combination of string, each character not getting interchanged with other character.
Having two fixed any two characters at the first and at the last of the string.
Return the number of such combinations.
Example: 'a' and 'b' are fixed in this example.
Input: "abcb"
Output: 5
Possible combinations: ab(0,1)
ab(0,3)
acb(0,2,3)
abb(0,1,3)
abcb(0,1,2,3)
-
Notifications
You must be signed in to change notification settings - Fork 0
Example: Any combination of string, each character not getting interchanged with other character. Having two fixed any two characters at the first and at the last of the string. Return the number of such combinations. Example: a abd b are fixed in this example. Input: "abcb" Output: 5 Possible combinations: ab(0,1) ab(0,3) acb(0,2,3) abb(0,1,3) …
subhosuper/string_fixed_combination
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Example: Any combination of string, each character not getting interchanged with other character. Having two fixed any two characters at the first and at the last of the string. Return the number of such combinations. Example: a abd b are fixed in this example. Input: "abcb" Output: 5 Possible combinations: ab(0,1) ab(0,3) acb(0,2,3) abb(0,1,3) …
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published