Perl 5, 24 bytes
Includes +1
for -a
perl -aE '/$/;map$_<$`||//+say,@F' <<< "-1 2 5 4 3 7 7"
Under codegolf style 2018 scoring this would be 22:
#!/usr/bin/perl -a
//;map$_<$'||//+say,@F
Includes +1
for -a
perl -aE '/$/;map$_<$`||//+say,@F' <<< "-1 2 5 4 3 7 7"
Under codegolf style 2018 scoring this would be 22:
#!/usr/bin/perl -a
//;map$_<$'||//+say,@F