Let\'s say I have an Array of numbers: [2,3,3,4,2,2,5,6,7,2]
What is the best way to find the minimum or maximum value in that Array?
Right now,
Amazed no-one mentioned parallelism here.
If you got really a huge array, you can use parallel-for, on sub ranges. In the end compare all sub-ranges. But parallelism comes width some penalty too, so this would not optimize on small arrays. However if you got huge datasets it starts to make sense, and you get a time division reduction nearing the amount of threads performing the test.