Help me with the given problem

help me on how to output character array reduced version in the problem.

hello @Kunalgoyal

for x , use sign to decide direction i.e whether we have to use east or west and magnitude of x is the number of times we need to move in that direction

similarly for y

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.