6 kyu
Assemble string
743 of 1,669kirull
Description:
Task
In this task, you need to restore a string from a list of its copies.
You will receive an array of strings. All of them are supposed to be the same as the original but, unfortunately, they were corrupted which means some of the characters were replaced with asterisks ("*"
).
You have to restore the original string based on non-corrupted information you have. If in some cases it is not possible to determine what the original character was, use "#"
character as a special marker for that.
If the array is empty, then return an empty string.
Examples:
input = [
"a*cde",
"*bcde",
"abc*e"
]
result = "abcde"
input = [
"a*c**",
"**cd*",
"a*cd*"
]
result = "a#cd#"
Strings
Arrays
Fundamentals
Similar Kata:
Stats:
Created | Feb 19, 2022 |
Published | Feb 19, 2022 |
Warriors Trained | 3148 |
Total Skips | 81 |
Total Code Submissions | 8390 |
Total Times Completed | 1669 |
JavaScript Completions | 743 |
PHP Completions | 75 |
COBOL Completions | 9 |
Haskell Completions | 34 |
Python Completions | 653 |
C Completions | 62 |
C# Completions | 155 |
Total Stars | 53 |
% of votes with a positive feedback rating | 93% of 304 |
Total "Very Satisfied" Votes | 268 |
Total "Somewhat Satisfied" Votes | 28 |
Total "Not Satisfied" Votes | 8 |
Total Rank Assessments | 21 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |