Given an initial coordinate (x, y) on a 2D infinite grid and a string of movement commands containing 'L' (left), 'R' (right), 'U' (up), and 'D' (down), calculate the final coordinate after executing…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.