6 kyu
Exclamation marks series #12: Remove odd number continuous exclamation marks and question marks
193 of 353myjinxin2015
Description:
Description:
Write a function that removes all odd number continuous exclamation marks and question marks in a string, repeat this operation until no continuous exclamation marks and question marks of odd length exist.
Please note: One exclamation mark or question mark is not continuous exclamation marks or question marks.
The string contains only !
and ?
.
Examples
"" --> ""
"!" --> "!"
"!!" --> "!!"
"!!!" --> ""
"!??" --> "!??"
"!???" --> "!"
"!!!??" --> "??"
"!!!???" --> ""
"!???!!" --> "!!!" --> ""
"!????!!!?" --> "!?????" --> "!"
Fundamentals
Similar Kata:
Stats:
Created | Oct 10, 2016 |
Published | Oct 10, 2016 |
Warriors Trained | 962 |
Total Skips | 34 |
Total Code Submissions | 3032 |
Total Times Completed | 353 |
JavaScript Completions | 161 |
Python Completions | 193 |
Ruby Completions | 35 |
Crystal Completions | 6 |
Total Stars | 31 |
% of votes with a positive feedback rating | 88% of 145 |
Total "Very Satisfied" Votes | 116 |
Total "Somewhat Satisfied" Votes | 24 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 9 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 7 kyu |