Draft
Print a Matrix in Spiral Form
26msg7086
Description:
Problem
Give a matrix, print values in a counter-clockwise spiral form from upper left corner of the matrix.
Only single character will be given as element. You do not need to verify the edge cases of input.
Sample test case
spiral_print([
['a','b','c','d'],
['e','f','g','h'],
['i','j','k','l']
]) # -> 'aeijklhdcbfg'
spiral_print([
['a','b','c','d']
]) # -> 'abcd'
Algorithms
Arrays
Similar Kata:
Stats:
Created | Oct 18, 2014 |
Warriors Trained | 143 |
Total Skips | 30 |
Total Code Submissions | 85 |
Total Times Completed | 26 |
Ruby Completions | 26 |
Total Stars | 3 |
% of votes with a positive feedback rating | 67% of 12 |
Total "Very Satisfied" Votes | 8 |
Total "Somewhat Satisfied" Votes | 0 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 14 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 8 kyu |