Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def kangaroo(x1, v1, x2, v2):
- a , b = x1 , x2
- if(v1 <= v2):
- return "NO"
- while a <= b:
- if(a == b):
- return "YES"
- a += v1
- b += v2
- return "NO"
- def diagonalDifference(arr):
- a = 0
- b = 0
- for i in range(n):
- a += arr[i][i]
- b += arr[i][n - i - 1]
- return abs(a - b)
- def maxMin(m, A):
- A.sort()
- mn = 10**9 + 1
- i , j = 0 , m - 1
- while j < n:
- mn = min(A[j]- A[i] , mn)
- j += 1
- i += 1
- return mn
Advertisement
Comments
-
- You can set the frame height by adding the CSS value 'height:100px;' for example:
- <iframe src="https://pastebin.com/embed_iframe/wqJtLb3e" style="border:none;width:100%"></iframe>
- Enable dark theme:
- <iframe src="https://pastebin.com/embed_iframe/wqJtLb3e?theme=dark" style="border:none;width:100%"></iframe>
-
- You can set the frame height by adding the CSS value 'height:100px;' for example:
- <iframe src="https://pastebin.com/embed_iframe/wqJtLb3e" style="border:none;width:100%"></iframe>
- Enable dark theme:
- <iframe src="https://pastebin.com/embed_iframe/wqJtLb3e?theme=dark" style="border:none;width:100%"></iframe>
Add Comment
Please, Sign In to add comment
Advertisement