Skip to content

Commit 7565a7a

Browse files
refactor 681
1 parent ab6a152 commit 7565a7a

File tree

1 file changed

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

1 file changed

+0
-24
lines changed

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,6 @@
33
import java.util.HashSet;
44
import java.util.Set;
55

6-
/**
7-
* 681. Next Closest Time
8-
*
9-
* Given a time represented in the format "HH:MM",
10-
* form the next closest time by reusing the current digits.
11-
* There is no limit on how many times a digit can be reused.
12-
* You may assume the given input string is always valid.
13-
* For example, "01:34", "12:09" are all valid. "1:34", "12:9" are all invalid.
14-
15-
Example 1:
16-
17-
Input: "19:34"
18-
Output: "19:39"
19-
Explanation: The next closest time choosing from digits 1, 9, 3, 4, is 19:39,
20-
which occurs 5 minutes later. It is not 19:33, because this occurs 23 hours and 59 minutes later.
21-
22-
Example 2:
23-
24-
Input: "23:59"
25-
Output: "22:22"
26-
Explanation: The next closest time choosing from digits 2, 3, 5, 9, is 22:22.
27-
It may be assumed that the returned time is next day's time since it is smaller than the input time numerically.
28-
29-
*/
306
public class _681 {
317
public static class Solution1 {
328
public String nextClosestTime(String time) {

0 commit comments

Comments
 (0)