5 kyu

String -> N iterations -> String

212 of 806Jomopipi

Description:

Welcome

This kata is inspired by This Kata

We have a string s

We have a number n

Here is a function that takes your string, concatenates the even-indexed chars to the front, odd-indexed chars to the back.

Examples

s = "Wow Example!"
result = "WwEapeo xml!"
s = "I'm JomoPipi"
result = "ImJm ii' ooPp"

The Task:

return the result of the string after applying the function to it n times.

example where s = "qwertyuio" and n = 2:

after 1 iteration  s = "qetuowryi"
after 2 iterations s = "qtorieuwy"
return "qtorieuwy"

Note

there's a lot of tests, big strings, and n is greater than a billion

so be ready to optimize.

after doing this: do it's best friend!

Check out my other kata!

Matrix Diagonal Sort OMG

String -> N iterations -> String

String -> X iterations -> String

ANTISTRING

Array - squareUp b!

Matrix - squareUp b!

Infinitely Nested Radical Expressions

pipi Numbers!

Strings
Algorithms
Puzzles

More By Author:

Check out these other kata created by Jomopipi

Stats:

CreatedApr 28, 2018
PublishedApr 28, 2018
Warriors Trained3216
Total Skips140
Total Code Submissions9413
Total Times Completed806
Java Completions212
C# Completions101
Python Completions484
Ruby Completions26
Go Completions19
Total Stars157
% of votes with a positive feedback rating95% of 172
Total "Very Satisfied" Votes155
Total "Somewhat Satisfied" Votes16
Total "Not Satisfied" Votes1
Total Rank Assessments4
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • Jomopipi Avatar
  • anter69 Avatar
  • Blind4Basics Avatar
  • Voile Avatar
  • hobovsky Avatar
  • akar-0 Avatar
  • __eloise__ Avatar
Ad