A move consists of taking a point
(x, y)
and transforming it to either (x, x+y)
or (x+y, y)
.
Given a starting point
(sx, sy)
and a target point (tx, ty)
, return True
if and only if a sequence of moves exists to transform the point (sx, sy)
to (tx, ty)
. Otherwise, return False
.
No comments:
Post a Comment