Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def checkInterval(cir_arr, size, start, interval):
- l = len(cir_arr)
- temp = 0
- start2 = start + interval - 1
- while True:
- if temp >= l:
- return
- temp+=interval
- start2 %= l
- if cin_arr[start2] % 2 == 0:
- temp2 = 0
- next_odd = 0
- indx = start2
- while True:
- if temp2==l:
- break
- if cin_arr[indx % l] % 2 == 1:
- next_odd = cin_arr[indx % l]
- indx+=1
- cin_arr[start2] = next_odd
- start2 += interval
Advertisement
Add Comment
Please, Sign In to add comment