We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 074b4fc commit de73f2aCopy full SHA for de73f2a
test/src/main/java/com/inuker/test/main.java
@@ -22,24 +22,10 @@
22
public class main {
23
24
public static void main(String[] args) {
25
+
26
}
27
- public int lengthLongestPath(String input) {
28
- Stack<Integer> stack = new Stack<Integer>();
29
- int max = 0;
30
- for (String line : input.split("\n")) {
31
- int depth = line.lastIndexOf("\t") + 1;
32
- while (stack.size() > depth) {
33
- stack.pop();
34
- }
35
- int parentLen = stack.isEmpty() ? 0 : stack.peek();
36
- int len = parentLen + line.length() - depth;
37
- if (line.contains(".")) {
38
- max = Math.max(len, max);
39
- } else {
40
- stack.push(len + 1);
41
42
43
- return max;
+ public String nextClosestTime(String time) {
44
45
0 commit comments