leetCode657

class Solution {
public:
    bool judgeCircle(string moves) {
        char action[4] = {'L','U','R','D'};
        int dx[4] = {-1,0,1,0};
        int dy[4] = {0,1,0,-1};
        int x = 0,y = 0;
        for(int i = 0;i

 

你可能感兴趣的:(leetcode)