Post History
J, 8 bytes ~.,:#/.~ Tacit function, this is the de facto method for this problem in J. Attempt it online!
Answer
#1: Initial revision
# [J](https://jsoftware.com/#/), 8 bytes ```J ~.,:#/.~ ``` Tacit function, this is the de facto method for this problem in J. [Attempt it online!](https://ato.pxeger.com/run?1=m70wa8GCpaUlaboWN73SFGytFOr0dKyU9fXquFKTM_IV0hQMgdBIwVjBVMFMwQwqqK6OkDVTMAerAMoCaVNjBRMFQwOIiVCDYRYAAA)