Рет қаралды 20
In this video I have discussed about DSA Question with multiple Approaches with code example
Q.Find a way to reach from point (A, B) to point (C, D),
Robot can move from (X, Y) to (X+Y, Y) or (X, Y+X).
If reached than print the path
else print "can not reach"
Reachable
int a = 2, b = 3;
int c = 12, d = 5;
Can not reach
int a = 2, b = 3;
int c = 12, d = 13;
Thanks
Comment if you need Complete Code link ...