'Confused Robot' problem

I am not able to build a logic for this problem

Link - https://csacademy.com/contest/fii-code-2020-round-3/task/confused-robot/statement/


at what point are u stuck it is a simple 2D matrix question

u are given the initial positions of the robot and u can only move the robot if it is a valid move else omit that character in the string

please share some approaches that u thought of so that I can help u build on it

and in case u have build some code I`ll help u with that as well

is it clear to you as to how to proceed??

No
I have very little practice of dp so I am not able to proceed

is is not a DP question simple string and 2D matrix
question

constraints are large and editorial says it cannot be solved by implementation and requires dp

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Please give me a dp solution