Skip to content

Commit c4dc515

Browse files
refactor 789
1 parent 9042b9b commit c4dc515

File tree

1 file changed

+2
-2
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+2
-2
lines changed

src/main/java/com/fishercoder/solutions/_789.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.fishercoder.solutions;
22

33
/**
4+
* 789. Escape The Ghosts
5+
*
46
* You are playing a simplified Pacman game. You start at the point (0, 0), and your destination is
57
* (target[0], target[1]). There are several ghosts on the map, the i-th ghost starts at (ghosts[i][0], ghosts[i][1]).
68
*
@@ -27,10 +29,8 @@ public boolean escapeGhosts(int[][] ghosts, int[] target) {
2729
return false;
2830
}
2931
}
30-
3132
return true;
3233
}
33-
3434
private int getDist(int[] p1, int[] p2) {
3535
return Math.abs(p1[0] - p2[0]) + Math.abs(p1[1] - p2[1]);
3636
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy