Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def segment(x, arr):
- minList = []
- def partition(l, n):
- for i in range(0, len(l), n):
- yield l[i:i + n]
- p = list(partition(arr, x))
- for elem in p:
- if len(elem) == x
- minList.append(min(elem))
- return max(minList)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement