Ad
Code
Diff
  • def find_max(arr):
        arr.sort()
        return arr[-1]
    • def find_max(arr):
    • max = 0
    • for i in range(len(arr)):
    • if arr[i] > max:
    • max = arr[i]
    • return max
    • arr.sort()
    • return arr[-1]