Combinations of uppercase and lowercase for a string
Description:
Given any input string, run through all the possible combinations of uppercase and lowercase.
Example No. 1:
input: dE
output: DE dE De de
Example No. 2:
input: cat346
output: cat346 Cat346 cAt346 CAt346 caT346 CaT346 cAT346 CAT346
Write a function called 'GetCombos' which has two parameters:
1st Parameter = A modifiable string (max length = 63 characters)
2nd Parameter = A callback function to be invoked for each combination
Constraints:
(1) If the string supplied to GetCombos is invalid, empty or too long then do nothing (just return immediately without invoking the callback function)
(2) If the callback function supplied to GetCombos is invalid then do nothing (just return immediately without invoking the callback function)
(3) Don't invoke the callback function with an invalid or empty string
(4) The output may be sorted or unsorted -- the order doesn't matter
(5) The output must not contain duplicates
Similar Kata:
Stats:
Created | Oct 25, 2022 |
Warriors Trained | 6 |
Total Skips | 0 |
Total Code Submissions | 9 |
Total Times Completed | 3 |
C Completions | 2 |
C++ Completions | 2 |
Total Stars | 0 |
% of votes with a positive feedback rating | 25% of 2 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 2 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 6 kyu |