Skip to main content
1 of 2
Ton Hospel
  • 14.9k
  • 1
  • 22
  • 45

Perl 5, 24 bytes

Includes +1 for -a

perl -aE '/$/;map$_<$`||//+say,@F' <<< "-1 2 5 4 3 7 7"

Try it online!

Under codegolf style 2018 scoring this would be 22:

#!/usr/bin/perl -a
//;map$_<$'||//+say,@F

Try it online!

Ton Hospel
  • 14.9k
  • 1
  • 22
  • 45