Skip to main content
Share Your Experience: Take the 2024 Developer Survey
3 votes

Apply gravity to this matrix

Minecraft, 0 bytes This is a bit cheaty, but the question does state you can take input in "all reasonable forms" and a grid of Minecraft blocks seems reasonable enough. Input is given as a ...
LostXOR's user avatar
  • 877
1 vote

Apply gravity to this matrix

Perl 5 -lF, 69 bytes $a=0;map$r[$a++]+=$_,@F}{say@$_ for reverse map[map$_-->0|0,@r],1..$. Try it online!
Xcali's user avatar
  • 15.2k
1 vote

Apply gravity to this matrix

Arturo, 59 bytes $=>[f:$->m->map size m\0'i->map m'r->r\[i-1]f map f&=>sort] Try it!
chunes's user avatar
  • 24.3k
1 vote

I'm Lazy*: Top-left align my text

Nibbles, 10 nibbles (5 bytes) `'.`';@|$$ Attempt This Online! Explanation It turns out that Nibbles' builtins are a very good fit for this challenge. ...
DLosc's user avatar
  • 39.7k

Only top scored, non community-wiki answers of a minimum length are eligible