trejkaz
BAN USER
Comments (3)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
The question is problematic because it shows a lack of understanding of both how text works and how fonts work.
It should at a minimum constrain the characters which are allowed to appear int the string, and also specify the direction the text will be rendered.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Site ate my first comment, so trying again.
In Ruby:
def traverse(array)
array.each_with_index.flat_map{|r,i| r.each_with_index.map{|c,j| [c,i,j]}}
.sort_by{|m,i,j| [(i+j),j]}.map{|a,i,j| a}
end
traverse([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
=> [1, 4, 2, 7, 5, 3, 8, 6, 9]
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Site ate the first comment, so trying again.
In Ruby:
- trejkaz January 08, 2017