Posts by radarek
Ruby, 29 bytes ->l,x{a,*b=l;a ?a+x*f[b,x]:0} Try it online
Ruby, 25 bytes Credits goes to @Shaggy and his JavaScript solution. ->a,l{l.map{a.sort! &_1}} Try this online! The other solution which not mutate original array
Ruby, 14 bytes `kill -11 #$$` Try this online!
Ruby, 36 bytes Infinite version: n=1;0while n+=p(n).digits.minmax.sum Try this online! (program is interrupted after it reaches the 128KiB limit of output)
Ruby, 48 bytes ->a{[a.split,b=a.chars-[$/],b-[' ']].map &:size} Try this online!
Ruby, 101 79 76 72 bytes This challenge was one of the funniest I have ever solved! 72 bytes solution (I show the solution as a Ruby string - because binary data is filtered out) "->l{l.sort_...
- ← Previous
- 1
- 2
- Next →