Sofya_Soloveva_

Untitled

Jul 23rd, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. def minRec(A, minimum):
  2.     N = len(A)
  3.     if N == 1:
  4.         return minimum  
  5.     else:
  6.         if A[N-1] < minimum:
  7.             minimum = A[N-1]
  8.         A = A[0:-1]
  9.         return minRec(A,minimum)
  10. A = [0,-4,-5,0,0,1]
  11. print(minRec(A, A[-1]))
Advertisement
Add Comment
Please, Sign In to add comment