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:
- Bug in Apple
- Father and Son
- Jumping Dutch act
- Planting Trees
- Give me the equation
- Find the murderer
- Reading a Book
- Eat watermelon
- Special factor
- Guess the Hat
- Symmetric Sort
- Are they symmetrical?
- Max Value
- Trypophobia
- Virus in Apple
- Balance Attraction
- Remove screws I
- Remove screws II
- Regular expression compression
- Collatz Array(Split or merge)
- Tidy up the room
- Waiting for a Bus
Puzzles
Games
Similar Kata:
Stats:
Created | Apr 1, 2016 |
Published | Apr 1, 2016 |
Warriors Trained | 1499 |
Total Skips | 8 |
Total Code Submissions | 2619 |
Total Times Completed | 853 |
JavaScript Completions | 443 |
Python Completions | 436 |
Total Stars | 30 |
% of votes with a positive feedback rating | 91% of 221 |
Total "Very Satisfied" Votes | 189 |
Total "Somewhat Satisfied" Votes | 24 |
Total "Not Satisfied" Votes | 8 |