Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Sep 2001 20:36:02 +0800
From:      "Wing Tim" <twchim1@hotmail.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   An algorithm to find median
Message-ID:  <F74ZWM6oewmRx7FHpOQ0000fc3c@hotmail.com>

next in thread | raw e-mail | index | archive | help
Dear all,
    On FreeBSD platform, I'm trying a C program to find out the median among 
5 elements. I can do so successfully using sorting method in which 7 
comparisons was used. However, it is known that there's a method of finding 
median among 5 elements using at most 6 comparisons. Anyone who remember 
that? Could you state it here or send me a path which shows the method?
    Thanks!

Regards,
Wing

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F74ZWM6oewmRx7FHpOQ0000fc3c>