morristyb

Untitled

Feb 23rd, 2021
389
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int maxArr(int arr[], int n)
  2. {
  3.     if (n == 1)
  4.     {
  5.         return arr[0];
  6.     }
  7.     else
  8.     {
  9.         return (maxArr(arr, n / 2) > maxArr(arr + n / 2, n / 2) ? maxArr(arr, n / 2) : maxArr(arr + n / 2, n / 2));
  10.     }
  11. }
RAW Paste Data