in reply to Re: Re^2: Shortest string containing all from 0000 to 9999 challenge. (how many?)
in thread Shortest string containing all from 0000 to 9999 challenge.

It isn't a permutation, but I suspect you can swap between them with y/0-9/9876543210/ and that it is the lexicographically last shortest solution. (:

                - tye
  • Comment on Re^4: Shortest string containing all from 0000 to 9999 challenge. (how many?)
  • Download Code

Replies are listed 'Best First'.
Re: Re^4: Shortest string containing all from 0000 to 9999 challenge. (how many?)
by sauoq (Abbot) on May 22, 2003 at 20:31 UTC

    Nope. This one starts with "9999", so the translation would start with "0000" which would sort before this one (hence, it couldn't be last.)

    I think you will get the lexicographically last shortest if you perform that translation on the lexicographically first shortest though. :-)

    -sauoq
    "My two cents aren't worth a dime.";
    

      Oops. I misread that you were starting with '9' as well as starting with '9999'. (Did I mention I'm busy today?)

      BTW, trim '9000' off the end of the first and '9999' off the front of the second, and you get the same substring.

                      - tye