One Line Task: Diamond Creator Pro
Description:
Relations :
The following challenge is partially related to two already existing Kata's. But is differnt in the sense that neither approach will work here and this is a more performance version as well. Links :
number1 , number2. OK last one maybe not.
Challenge :
You are given an integer n
as input. Your job is to create a diamond that is 2x the given number n
.
Input :
Input is integer n
and n > 2 ≤ 3000.
Output :
Output will be a string and it will be in form of a diamond consisting of +
with an addition line at the start showing n
using +
Examples :
D(3) :
+++
+
+++
+++++
+++++
+++
+
D(5) :
+++++
+
+++
+++++
+++++++
+++++++++
+++++++++
+++++++
+++++
+++
+
Restrictions :
This is code-golf so there is a limit.
Javascript solutions are limited to less than 111 characters.
Python solution are limited to less than 89 characters
Ruby solution are limited to less than 82 characters
All limits are exlusive
Similar Kata:
Stats:
Created | Apr 19, 2018 |
Published | Apr 19, 2018 |
Warriors Trained | 677 |
Total Skips | 19 |
Total Code Submissions | 2249 |
Total Times Completed | 140 |
JavaScript Completions | 52 |
Python Completions | 86 |
Ruby Completions | 16 |
Total Stars | 26 |
% of votes with a positive feedback rating | 94% of 54 |
Total "Very Satisfied" Votes | 49 |
Total "Somewhat Satisfied" Votes | 4 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 6 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 7 kyu |