SHORTEST PATH STRING

IN THE QUESTION SIR GIVE THE HOMEWORK TO FINALLY PRINT THE REDUCED STRING I ATTACHED MY WAY I THINK IN THAT AT THE SAME TIME WE MORE PRESIZELY TRY TO PRINT DIRECT THE REDUCED STRING BUT I AM NOT ABLE TO I ATTACHED MY SOLUTION PLS SUGGEST ME THE BETTER WAY TO DO IT

hello @dipeshgupta197

use sign to decide whegther u have to print east or west , north or south.

and use magnitude to decide how many time u need to print them simple.

did u check my code sir i use sign in if else condition but how i print i didnt find

sir did u check my code i decide the direction using if else condition but not to able to print it pls provide the solution as my mind says i can,t print string without the use of loops