Skip to content

Commit ea99018

Browse files
refactor 604
1 parent 07c3256 commit ea99018

File tree

1 file changed

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

1 file changed

+0
-31
lines changed

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

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,6 @@
33
import java.util.ArrayDeque;
44
import java.util.Deque;
55

6-
/**
7-
* 604. Design Compressed String Iterator
8-
*
9-
* Design and implement a data structure for a compressed string iterator. It should support the following operations: next and hasNext.
10-
The given compressed string will be in the form of each letter followed by a positive integer representing
11-
the number of this letter existing in the original uncompressed string.
12-
13-
next() - if the original string still has uncompressed characters, return the next letter; Otherwise return a white space.
14-
hasNext() - Judge whether there is any letter needs to be uncompressed.
15-
16-
Note:
17-
Please remember to RESET your class variables declared in StringIterator,
18-
as static/class variables are persisted across multiple test cases. Please see here for more details.
19-
20-
Example:
21-
22-
StringIterator iterator = new StringIterator("L1e2t1C1o1d1e1");
23-
24-
iterator.next(); // return 'L'
25-
iterator.next(); // return 'e'
26-
iterator.next(); // return 'e'
27-
iterator.next(); // return 't'
28-
iterator.next(); // return 'C'
29-
iterator.next(); // return 'o'
30-
iterator.next(); // return 'd'
31-
iterator.hasNext(); // return true
32-
iterator.next(); // return 'e'
33-
iterator.hasNext(); // return false
34-
iterator.next(); // return ' '
35-
36-
*/
376
public class _604 {
387
public static class Solution1 {
398
public static class StringIterator {

0 commit comments

Comments
 (0)