Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!cmcl2!seismo!rochester!crowl From: crowl@rochester.ARPA (Lawrence Crowl) Newsgroups: net.lang.c Subject: Re: Byte order (or you are both wro Message-ID: <17312@rochester.ARPA> Date: Thu, 17-Apr-86 13:39:27 EST Article-I.D.: rocheste.17312 Posted: Thu Apr 17 13:39:27 1986 Date-Received: Sat, 19-Apr-86 14:15:12 EST References: <17162@rochester.ARPA> <139200027@uiucdcsb> Reply-To: crowl@rochester.UUCP (Lawrence Crowl) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 23 >I wrote: >> CHALLENGE: Come up with a scheme for representing numbers, and a sorting >> scheme in which numbers sort naturally. Your scheme must deal with variable >> length character strings and variable size numbers. That is, you cannot >> requires strings to be padded with nulls, or numbers to be padded with zeros. Arch D. Robison wrote: >... -4 = AAAAZ -3 = AAAZ -2 = AAZ -1 = AZ > 0 = M 1 = Z 2 = ZZ 3 = ZZZ 4 = ZZZZ ... > An interesting solution. I totally failed to consider unary notations. Just to keep the answers honest, I will add the requirement that some efficient form of representation be used. Radix notation is efficient, but you are not required to use it. For extra credit, extend your notation to deal with non-integral values. This is easy under current notation if the integral part is the same. P -- Lawrence Crowl 716-275-5766 University of Rochester Computer Science Department ...!{allegra,decvax,seismo}!rochester!crowl Rochester, New York, 14627