File tree 1 file changed +0
-21
lines changed
src/main/java/com/fishercoder/solutions
1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change 1
1
package com .fishercoder .solutions ;
2
2
3
- /**
4
- * 657. Judge Route Circle
5
- *
6
- * Initially, there is a Robot at position (0, 0).
7
- * Given a sequence of its moves, judge if this robot makes a circle,
8
- * which means it moves back to the original place.
9
-
10
- The move sequence is represented by a string.
11
- And each move is represent by a character.
12
- The valid robot moves are R (Right), L (Left), U (Up) and D (down).
13
- The output should be true or false representing whether the robot makes a circle.
14
-
15
- Example 1:
16
- Input: "UD"
17
- Output: true
18
-
19
- Example 2:
20
- Input: "LL"
21
- Output: false
22
- */
23
-
24
3
public class _657 {
25
4
public static class Solution1 {
26
5
public boolean judgeCircle (String moves ) {
You can’t perform that action at this time.
0 commit comments