in reply to Re: Challenge: Find median string in a list
in thread Challenge: Find median string in a list
The N^2 is reduce to N^2 / 2 by assuming that every string up to the current string has already been tested against the current string and all that need be tested is the current string against all later strings. If you know that the current string can't be the median string, it is not safe to skip it because it may also disqualify later strings. Without doing the work, you can't know for sure.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Challenge: Find median string in a list
by ysth (Canon) on Jul 04, 2007 at 19:56 UTC | |
by Limbic~Region (Chancellor) on Jul 05, 2007 at 01:09 UTC |