Last active
May 12, 2020 14:14
-
-
Save entrptaher/4428cb2f8b9627ba9f8957b8e29e6a0b to your computer and use it in GitHub Desktop.
Programming tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Given the input is a string | |
Print out all permutations and permutations of their capitalizations, in an array | |
All elements of the output array should contain all letters from the input | |
*/ | |
function capitalPermutations(input){} | |
capitalPermutations("a") // => ["a", "A"] | |
capitalPermutations("ab") // => ["ab", "Ab", "aB", "ba", "Ba", "bA"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment