To print shortest string

Sir gave a question in last that i have to print a short string of provided string,but sir i did’nt get it how to print short string of the provided string .

hello @mayurjhode55,
it is simple.
let say final displacement is x,y.
so if x >0 print x times ‘E’
if x<0 then print x times ‘W’

after that
if y > 0 print y times ‘N’
if y<0 print y times ‘S’

thats it
example if x=2 , y=1
then output will be EEN

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.