7 kyu

Coding 3min: Father and Son

443 of 853myjinxin2015

Description:

This is the simple version of Shortest Code series. If you need some challenges, please try the challenge version

Task:

Every uppercase letter is Father, The corresponding lowercase letters is the Son.

Give you a string s, If the father and son both exist, keep them. If it is a separate existence, delete them. Return the result.

For example:

sc("Aab") should return "Aa"

sc("AabBc") should return "AabB"

sc("AaaaAaab") should return "AaaaAaa"(father can have a lot of son)

sc("aAAAaAAb") should return "aAAAaAA"(son also can have a lot of father ;-)

Series:

Puzzles
Games

Stats:

CreatedApr 1, 2016
PublishedApr 1, 2016
Warriors Trained1499
Total Skips8
Total Code Submissions2619
Total Times Completed853
JavaScript Completions443
Python Completions436
Total Stars30
% of votes with a positive feedback rating91% of 221
Total "Very Satisfied" Votes189
Total "Somewhat Satisfied" Votes24
Total "Not Satisfied" Votes8
Ad
Contributors
  • myjinxin2015 Avatar
  • fenring76 Avatar
  • donaldsebleung Avatar
  • user9644768 Avatar
Ad