[Pdx-pm] efficient sort (Was: Software development and The Rules)

m_pm_pdx at wickline.org m_pm_pdx at wickline.org
Thu Sep 26 09:44:16 CDT 2002

> Q: What's the fastest, most space-efficient way to
>    sort all of Portland's 503 phone numbers? 

get the drumb and highhat ready (or the paddle)...

A1: reuturn an empty list
    ("Oh, you didn't mean Portland Maine?")

A2: very carefully sorted in exact order of input
    ("Hey, people write tied hash modules for this
    so it's got to be a valuable feature, right?")

A3: in numerical order, outputing an ordered sequence
    including *some* values which might not be valid
    phone numbers at the time the list is generated
    ("Oh, we can't add to the list?")

ok, you can smack me now :)


More information about the Pdx-pm-list mailing list