6 kyu
String tops
616 of 1,806dcieslak
Description:
Task
Write a function that accepts msg
string and returns local tops of string from the highest to the lowest.
The string's tops are from displaying the string in the below way:
3
p 2 4
g o q 1
b f h n r z
a c e i m s y
d j l t x
k u w
v
The next top is always 1 character higher than the previous one.
For the above example, the solution for the abcdefghijklmnopqrstuvwxyz1234
input string is 3pgb
.
- When the
msg
string is empty, return an empty string. - The input strings may be very long. Make sure your solution has good performance.
Check the test cases for more samples.
Fundamentals
Strings
Similar Kata:
Stats:
Created | Sep 12, 2017 |
Published | Sep 12, 2017 |
Warriors Trained | 3788 |
Total Skips | 274 |
Total Code Submissions | 6032 |
Total Times Completed | 1806 |
JavaScript Completions | 616 |
Python Completions | 648 |
C# Completions | 191 |
C++ Completions | 248 |
Crystal Completions | 8 |
Ruby Completions | 73 |
Go Completions | 56 |
D Completions | 6 |
Rust Completions | 54 |
RISC-V Completions | 10 |
Lua Completions | 25 |
Total Stars | 64 |
% of votes with a positive feedback rating | 94% of 404 |
Total "Very Satisfied" Votes | 365 |
Total "Somewhat Satisfied" Votes | 29 |
Total "Not Satisfied" Votes | 10 |
Total Rank Assessments | 8 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |