Skip to main content
added 97 characters in body
Source Link
Dom Hastings
  • 24.7k
  • 4
  • 58
  • 94

Perl 5, 70 bytes

Perl 5, 60 bytes

6859 bytes code + 21 for -nlp.

@n=0$_="@{[0..$_*9;map{($;=++$_)*9]}";$_=eval's/\b[^ $-++while$n[$-]=~]+ /[$_]/;$-=!print splice@n,$-,1}0..$_++;$&;'x$

I'm sure this can be improved considerably, I'll play with this after work.

Try it online!Try it online! (Includes -l for visual purposes and $-=0; to reset each iteration)

Perl 5, 70 bytes

68 bytes code + 2 for -nl.

@n=0..$_*9;map{$-++while$n[$-]=~/[$_]/;$-=!print splice@n,$-,1}0..$_

I'm sure this can be improved considerably, I'll play with this after work.

Try it online!

Perl 5, 60 bytes

59 bytes code + 1 for -p.

$_="@{[0..($;=++$_)*9]}";$_=eval's/\b[^ $-]+ //;$-++;$&;'x$

Try it online! (Includes -l for visual purposes and $-=0; to reset each iteration)

Source Link
Dom Hastings
  • 24.7k
  • 4
  • 58
  • 94

Perl 5, 70 bytes

68 bytes code + 2 for -nl.

@n=0..$_*9;map{$-++while$n[$-]=~/[$_]/;$-=!print splice@n,$-,1}0..$_

I'm sure this can be improved considerably, I'll play with this after work.

Try it online!