6 kyu
T.T.T.61: Alien's magic
55 of 81myjinxin2015
Description:
Description
Some aliens are hiding in codewars
. They have a magic that can change the time and space. The name of this magic is called lalala
. The aliens will spell out the magic spell lalala
, all the time and space of the object will be changed.
Example 1:
things=[
"In the afternoon, John had dinner at the restaurant.",
"At noon, Tom stool in the toilet."
]
lalala(things) ===
[
"At noon, John had dinner in the toilet.",
"In the afternoon, Tom stool at the restaurant."
]
Example 2:
things=[
"In the afternoon, John had dinner at the restaurant.",
"At noon, Tom stool in the toilet.",
"At 10 in the evening, Anne dancing pole dance in the bar."
]
lalala(things) ===
[
"At noon, John had dinner in the toilet.",
"At 10 in the evening, Tom stool in the bar.",
"In the afternoon, Anne dancing pole dance at the restaurant."
]
As you can see, the order of the change of time and space is:
first --> last
second --> first
third --> second
and so on...
Task
Complete function lalala
that accepts a argument things
, returns the result in accordance with the above rules. You can assume that things
is an array containing at least two string elements.
Puzzles
Games
Similar Kata:
Stats:
Created | Sep 26, 2016 |
Published | Sep 26, 2016 |
Warriors Trained | 307 |
Total Skips | 7 |
Total Code Submissions | 835 |
Total Times Completed | 81 |
JavaScript Completions | 55 |
Python Completions | 33 |
Total Stars | 4 |
% of votes with a positive feedback rating | 89% of 31 |
Total "Very Satisfied" Votes | 24 |
Total "Somewhat Satisfied" Votes | 7 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 5 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |