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

Stats:

CreatedOct 10, 2016
PublishedOct 10, 2016
Warriors Trained962
Total Skips34
Total Code Submissions3032
Total Times Completed353
JavaScript Completions161
Python Completions193
Ruby Completions35
Crystal Completions6
Total Stars31
% of votes with a positive feedback rating88% of 145
Total "Very Satisfied" Votes116
Total "Somewhat Satisfied" Votes24
Total "Not Satisfied" Votes5
Total Rank Assessments9
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • myjinxin2015 Avatar
  • GiacomoSorbi Avatar
  • suic Avatar
  • smile67 Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad