M
Marcin
How I can find median (middle element) in T(n) = O(n) int the worst case?
Marcin said:How I can find median (middle element) in T(n) = O(n) int the
worst case?
How I can find median (middle element) in T(n) = O(n) int the worst case?
This depends on what O(n) means, comparisons, moves, passes over the dataMarcin said:How I can find median (middle element) in T(n) = O(n) int the worst case?
This depends on what O(n) means, comparisons, moves, passes over the data
etc...
I think you are impying comparisons, in which case it cannot be done.
Richard said:As it happens the subject is off topic and your reply is incorrect;
the median can be found using worst case O(n) comparisons.
BGreene said:I apologize for this ignorant post.
I was thinking n comparsions not O(n).
Next time I'll keep my keyboard quiet .
I apologize for this ignorant post. I was thinking n comparsions not O(n).
Next time I'll keep my keyboard quiet .
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.