Skip to content

Commit 2785df4

Browse files
refactor 248
1 parent c3a590b commit 2785df4

File tree

1 file changed

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

1 file changed

+2
-14
lines changed

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

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,9 @@
33
import java.util.HashMap;
44
import java.util.Map;
55

6-
/**
7-
* A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down).
8-
9-
Write a function to count the total strobogrammatic numbers that exist in the range of low <= num <= high.
10-
11-
For example,
12-
Given low = "50", high = "100", return 3. Because 69, 88, and 96 are three strobogrammatic numbers.
13-
14-
Note:
15-
Because the range might be a large number, the low and high numbers are represented as string.
16-
17-
*/
186
public class _248 {
197

20-
static class Solution2 {
8+
public static class Solution1 {
219
/**Credit: https://discuss.leetcode.com/topic/31386/concise-java-solution
2210
*
2311
Construct char arrays from low.length() to high.length()
@@ -60,7 +48,7 @@ public void dfs(String low, String high , char[] c, int left, int right, int[] c
6048
}
6149
}
6250

63-
class Solution1 {
51+
public static class Solution2 {
6452
Map<Character, Character> map = new HashMap<>();
6553

6654
{

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