Postorder

Score: 70.11 (fail)

only works for strings of length 5 or shorter. sort does not use insertion sort for arrays larger than that :-)

#!perl -l
@~=sort{$ARGV[0]!~/$b.*$a/|!$b&&($_.=$b,$b='',-1)}pop=~/./g,z;print

Score: 76.10 (pass)

the stack approach w/o the stack. long way to go still

#!perl -l
$_=pop;while(/./g){$~=$&;/\G.?/;s|$~||,$o.=$~if$ARGV[0]=~/$&.*$~/}print$o

Score: 81.08 (pass)

but which 30 characters to drop..

#!perl -l
for($_=pop;s~(.*)\b(\w)~$1~;$}=$2.$}){$z=index$y||=pop,$2;s~.{$z}~$& ~}print$}

Score: 85.10 (pass)

todo: make this into a regex.. :-)

#!perl -l
map$ARGV[0]=~s/(\w*)$_(\w*)/$1~$2/&@o[++$n+length$1.$2]=~s/^/$_/,pop=~/./g;print@o

Score: 118.09 (pass)

brains.. hurt.. on the first try..

#!perl -l
$i=pop;while(@ARGV){$_=pop;s/.//||next;@o=($&,@o);$i=~s/([^~]*)$&/$1~/;
$l=length$1;push@ARGV,/(.{$l})(.*)/}print@o