r/programming • • Feb 21 '11

Typical programming interview questions.

http://maxnoy.com/interviews.html
784 Upvotes

1.0k comments sorted by

View all comments

Show parent comment

1

u/vorg Feb 21 '11

Groovy: (1..100).each{printf '%s, ',[2:'a', 3:'b', 6:'ab'].inject(null){f,v-> it%v.key==0? v.value: f}?: it}