J, 17 bytes
/:~"1&.|:&.(_&q:)
Probably the first J answer on PPCG to use &. twice. After this and that , I'm starting to feel like a weird J hacker.
Basically a translation from Dennis' Jelly answer.
How it works
/:~"1&.|:&.(_&q:) Single monadic verb.
(_&q:) Convert each number to prime exponents
(automatically zero-filled to the right)
|:&. Transpose
/:~"1&. Sort each row in increasing order
|:&. Transpose again (inverse of transpose == transpose)
(_&q:) Apply inverse of prime exponents; convert back to integers
J, 17 bytes
/:~"1&.|:&.(_&q:)
Probably the first J answer on PPCG to use &. twice. Basically a translation from Dennis' Jelly answer.
How it works
/:~"1&.|:&.(_&q:) Single monadic verb.
(_&q:) Convert each number to prime exponents
(automatically zero-filled to the right)
|:&. Transpose
/:~"1&. Sort each row in increasing order
|:&. Transpose again (inverse of transpose == transpose)
(_&q:) Apply inverse of prime exponents; convert back to integers
J, 17 bytes
/:~"1&.|:&.(_&q:)
Probably the first J answer on PPCG to use &. twice. After this and that , I'm starting to feel like a weird J hacker.
Basically a translation from Dennis' Jelly answer.
How it works
/:~"1&.|:&.(_&q:) Single monadic verb.
(_&q:) Convert each number to prime exponents
(automatically zero-filled to the right)
|:&. Transpose
/:~"1&. Sort each row in increasing order
|:&. Transpose again (inverse of transpose == transpose)
(_&q:) Apply inverse of prime exponents; convert back to integers
J, 17 bytes
/:~"1&.|:&.(_&q:)
Probably the first J answer on PPCG to use &. twice. Basically a translation from Dennis' Jelly answer.
How it works
/:~"1&.|:&.(_&q:) Single monadic verb.
(_&q:) Convert each number to prime exponents
(automatically zero-filled to the right)
|:&. Transpose
/:~"1&. Sort each row in increasing order
|:&. Transpose again (inverse of transpose == transpose)
(_&q:) Apply inverse of prime exponents; convert back to integers