6 kyu
Diagonal Strings
82 of 254frkn2076
Description:
In this kata, you have a string array has N elements and each element of array has N length(NxN).
For Example: {"abcd","kata","1234","qwer"}
You must first sort the array alphabetically. And output consists of letters obtained diagonally (from upper left to lower right).
For Example:
1234 abcd
abcd kata
kata qwer
qwer -> 1234 => "1btr" 1234 -> abcd => "aae4"
kata qwer
qwer 1234
1234 abcd
abcd -> kata => "kw3d" kata -> qwer => "q2ca"
Output : {"aae4","kw3d","1btr","q2ca"} (by input order)
TASK:
Write a function that accepts a square(NxN) array and returns diagonal strings as array (as the order of input array).
NOTES:
If input array is not square(NxN) (array with 0 length is not accept as square too) returns null.
- You must return error, for the above case in Go language.
Fundamentals
Similar Kata:
Stats:
Created | Feb 20, 2019 |
Published | Feb 20, 2019 |
Warriors Trained | 1115 |
Total Skips | 221 |
Total Code Submissions | 2039 |
Total Times Completed | 254 |
C# Completions | 82 |
Dart Completions | 61 |
Go Completions | 32 |
JavaScript Completions | 87 |
Total Stars | 28 |
% of votes with a positive feedback rating | 72% of 78 |
Total "Very Satisfied" Votes | 47 |
Total "Somewhat Satisfied" Votes | 18 |
Total "Not Satisfied" Votes | 13 |
Total Rank Assessments | 4 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |