Explain which algorithm you would use to implement a function that takes an array of integers and returns the maximum integer in the collection, assuming that the length of the array is less than 1000. Would you use Bubble Sort or Merge Sort and Why?
Also, what happens to the above algorithm choice, if the array length is greater than 1000?