We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90608da commit bcdede3Copy full SHA for bcdede3
reaching-point.py
@@ -0,0 +1,16 @@
1
+class Solution:
2
+ """
3
+ @param start: a point [x, y]
4
+ @param target: a point [x, y]
5
+ @return: return True or False
6
7
+ def ReachingPoints(self, start, target):
8
+ # write your code here
9
+ while start != target:
10
+ if (target[0] < start[0]) or (target[1] < start[1]):
11
+ return False
12
+ if target[0] < target[1]:
13
+ target[1] -= target[0]
14
+ else:
15
+ target[0] -= target[1]
16
+ return True
0 commit comments