Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
3 added 7 characters in body
source | link

Ruby, 51 4646 43 bytes

->n{(0..25).map{|x|(' '*x)[0,n-1]+1]<<(x+97).chr}}

Returns a list of strings.

Looks like the Python guys were on to something with their subscripts. -5 bytes by taking inspiration from Mr. Xcoder's improvement of ppperry's solution.

Previous solution with rjust (51 bytes):

->n{i=0;(?a..?z).map{|c|c.rjust i+=n>c.ord-97?1:0}}

Ruby, 51 46 bytes

->n{(0..25).map{|x|(' '*x)[0,n-1]+(x+97).chr}}

Returns a list of strings.

Looks like the Python guys were on to something with their subscripts. -5 bytes by taking inspiration from Mr. Xcoder's improvement of ppperry's solution.

Previous solution with rjust (51 bytes):

->n{i=0;(?a..?z).map{|c|c.rjust i+=n>c.ord-97?1:0}}

Ruby, 51 46 43 bytes

->n{(0..25).map{|x|(' '*x)[0,n-1]<<(x+97)}}

Returns a list of strings.

Looks like the Python guys were on to something with their subscripts. -5 bytes by taking inspiration from Mr. Xcoder's improvement of ppperry's solution.

Previous solution with rjust (51 bytes):

->n{i=0;(?a..?z).map{|c|c.rjust i+=n>c.ord-97?1:0}}
2 added 274 characters in body
source | link

Ruby, 5151 46 bytes

->n{(0..25).map{|x|(' '*x)[0,n-1]+(x+97).chr}}

Returns a list of strings.

Looks like the Python guys were on to something with their subscripts. -5 bytes by taking inspiration from Mr. Xcoder's improvement of ppperry's solution.

Previous solution with rjust (51 bytes):

->n{i=0;(?a..?z).map{|c|c.rjust i+=n>c.ord-97?1:0}}

Returns a list of strings.

Ruby, 51 bytes

->n{i=0;(?a..?z).map{|c|c.rjust i+=n>c.ord-97?1:0}}

Returns a list of strings.

Ruby, 51 46 bytes

->n{(0..25).map{|x|(' '*x)[0,n-1]+(x+97).chr}}

Returns a list of strings.

Looks like the Python guys were on to something with their subscripts. -5 bytes by taking inspiration from Mr. Xcoder's improvement of ppperry's solution.

Previous solution with rjust (51 bytes):

->n{i=0;(?a..?z).map{|c|c.rjust i+=n>c.ord-97?1:0}}
1
source | link

Ruby, 51 bytes

->n{i=0;(?a..?z).map{|c|c.rjust i+=n>c.ord-97?1:0}}

Returns a list of strings.