Apr 19, 2003 #1 JGSH Programmer Feb 23, 2003 6 US Hi all, Does anyone know a good algorithm(good runtime) to find the median of n values? Thank you, Jon
Hi all, Does anyone know a good algorithm(good runtime) to find the median of n values? Thank you, Jon
Apr 19, 2003 #2 palbano Programmer Oct 9, 1998 4,341 US Put values in an array and sort them. The middle of the array is the median. -pete Upvote 0 Downvote
Apr 19, 2003 #3 CalicoKitty Programmer Apr 19, 2003 2 US A good linear algorithm for finding the kth order statistic is found on many websites, it is too long for me to recopy, so here is a site: http://www.cs.uiowa.edu/~jjkari/44_03/median.pdf I have used this algorithm (or a variation of it) and it works pretty well. Denise Upvote 0 Downvote
A good linear algorithm for finding the kth order statistic is found on many websites, it is too long for me to recopy, so here is a site: http://www.cs.uiowa.edu/~jjkari/44_03/median.pdf I have used this algorithm (or a variation of it) and it works pretty well. Denise