how Any efficient easy way to find the maximum list among N lists with the same length using Mathematica?
Questions
This question is a continuation of a previous thread to compare two lists with the same length: Is there any efficient easy way to compare two lists with the same length with Mathematica? Given two lists Here’s my code:
Any better trick to do this? EDIT: I want to define this as a function like:
But the question is the code above cross two lines, any fix for this? Here is some code working but not that beautiful
or

————————————————
Answer
A modification of Mr.Wizard’s approach works a few times faster.
We test the both methods with
and we get
and
EDIT In general, to choose a method, we should know first what kind of data we are to deal with. (lenght of lists, their number, types of numbers ). While we have a large number of short lists
however if we insert “the greatest element” :
timings close up. 
arrays,list,mathematica8,wolframmathematica 
Facebook Comments