Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. def segment(x, arr):
  2. minList = []
  3. def partition(l, n):
  4. for i in range(0, len(l), n):
  5. yield l[i:i + n]
  6. p = list(partition(arr, x))
  7. for elem in p:
  8. if len(elem) == x
  9. minList.append(min(elem))
  10. return max(minList)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement