Posts by radarek
Ruby, 29 bytes ->l,x{a,*b=l;a ?a+x*f[b,x]:0} Try it online
Answer
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
Answer
Ruby, 31 bytes ->a{a.map{$*[_1]=1.+$*[_1]||0}} Try this online! $* is a global variable, so calling this lambda multiple times (in a single process) would give wrong result. A 32 bytes vers...
Answer
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)
Answer
Ruby, 35 bytes ->m{require'matrix';Matrix[*m].det} Attempt This Online!
Answer
- ← Previous
- 1
- 2
- Next →