+ 1

Can any one help me to understand this problem?

Explain 2&3 test cases if the output traced is like as they given... I'm not getting output as they given If you got the output as they given explain https://www.sololearn.com/post/273372/?ref=app

24th Mar 2020, 2:54 AM
V Chandu
V Chandu - avatar
4 odpowiedzi
+ 2
No, the given outputs are correct. Read again. """ In addition, Chef should never perform multiple consecutive moves along the same axis of the grid. If there are multiple consecutive instructions to move along the same axis (left/right or up/down), he should perform only the first of these """ In case 2: 'LLLRUUD' in Substring 'LLLR' and 'UUD', we are moving along the same axis, so, only first of their moves will be executed. Equivalently : LLLRUUD = LU And LU = (0,0) --> (-1,0) --> (-1,1) You can think for case 3 in similar way.
24th Mar 2020, 3:48 AM
R_3-dr
R_3-dr - avatar
+ 1
Sudden Lee wow you are right, I had not noticed that. Thanks 👌👍
24th Mar 2020, 4:40 AM
Carlos Martinez
Carlos Martinez - avatar
+ 1
Sudden Lee thanks 👍💐
24th Mar 2020, 10:39 AM
V Chandu
V Chandu - avatar
0
you are right is strange, because the second case LLLRUUD should give (0,0) Because begins 0,0 L-1,0 L-1,0 L-1,0 here is R so 0,0 U0,1 U0,1 and next D so 0,0
24th Mar 2020, 3:10 AM
Carlos Martinez
Carlos Martinez - avatar