# Tag Info

### Diamondize a Matrix

R, 102 94 bytes \(L,N=length(L),>=rep)apply(t(mapply(\(j,n)c(0>n-1,j,0>N-n),L,1:N)),2,\(a)list(rev(a[0<a]))) Attempt This Online! Outputs a list of ...

R, 50 49 bytes -1 byte thanks to pajonk function(x,n=1:dim(x)-1)all((!n%o%n*!diag(n))-!x) Try it online! This solution is similar to the other existing 2 answers ...

### 9-16-25 2D Matrix

Brachylog, 43 bytes {hlL;Mṁ₍+ᵐ~h?∧M\+ᵐ~t?∧Mc≠{>0∧.^₂≥?∧}ᵛL∧M≜}ᵐ Try it online! Takes about 5 seconds for all 3 cases on TIO. Explanation Since Brachylog uses ...
• 38.9k

### 9-16-25 2D Matrix

Nekomata + -1, 21 bytes ᵃ#*R↕v#Š:ᵐ∑ᵈv=¿:∑ᵈ§=¿ Attempt This Online! I just wanted to see how fast my golfing language can go. ...
• 48.5k

Picat ...
• 77k

### 9-16-25 2D Matrix

Python To run the code, install the z3-solver package. It can usually solve all three cases in ~1s. ...
• 22.7k
Accepted

### 9-16-25 2D Matrix

Java (Simple) backtracking approach with random candidates: ...

• 15.3k

### 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 ...
• 887

### 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. ...
• 39.7k
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!
• 24.7k

### Construct the Identity Matrix

Uiua, 4 bytes ⊞=.⇡ Try it online! Read: table of = equality by ...
• 7,402

### Checkered grid with X mark

Perl 5 -n, 73 bytes $b=<>;//,say map{($'+$_)%2||2*!!$b*($b>=abs)*(abs==abs$')}@;for@;=-$_..$_ Try it online!
• 15.3k
1 vote

• 24.7k