morristyb

Untitled

Feb 23rd, 2021
391
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.         int left = maxArr(arr, n / 2);
  10.         int right = maxArr(arr + n / 2, n / 2);
  11.         return (left > right ? left : right;)
  12.     }
  13. }
RAW Paste Data