6 kyu
Basics 06: Reversing and Combining Text
255 of 1,214smile67
Description:
Your task is to Reverse and Combine Words. It's not too difficult, but there are some things you have to consider...
So what to do?
Input: String containing different "words" separated by spaces
1. More than one word? Reverse each word and combine first with second, third with fourth and so on...
(odd number of words => last one stays alone, but has to be reversed too)
2. Start it again until there's only one word without spaces
3. Return your result...
Some easy examples:
Input: "abc def"
Output: "cbafed"
Input: "abc def ghi 123"
Output: "defabc123ghi"
Input: "abc def gh34 434ff 55_eri 123 343"
Output: "43hgff434cbafed343ire_55321"
I think it's clear?! First there are some static tests, later on random tests too...
Hope you have fun! :-)
Strings
Arrays
Fundamentals
Similar Kata:
Stats:
Created | Feb 8, 2016 |
Published | Feb 8, 2016 |
Warriors Trained | 3011 |
Total Skips | 111 |
Total Code Submissions | 6253 |
Total Times Completed | 1214 |
C# Completions | 255 |
Python Completions | 444 |
JavaScript Completions | 328 |
Elixir Completions | 28 |
Julia Completions | 14 |
Ruby Completions | 182 |
Total Stars | 63 |
% of votes with a positive feedback rating | 93% of 272 |
Total "Very Satisfied" Votes | 238 |
Total "Somewhat Satisfied" Votes | 28 |
Total "Not Satisfied" Votes | 6 |