Skip to content

Commit 665c0a1

Browse files
refactor 1286
1 parent c58b3bb commit 665c0a1

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

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

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,6 @@
33
import java.util.ArrayList;
44
import java.util.List;
55

6-
/**
7-
* 1286. Iterator for Combination
8-
*
9-
* Design an Iterator class, which has:
10-
* A constructor that takes a string characters of sorted distinct lowercase English letters and a number combinationLength as arguments.
11-
* A function next() that returns the next combination of length combinationLength in lexicographical order.
12-
* A function hasNext() that returns True if and only if there exists a next combination.
13-
*
14-
* Example:
15-
* CombinationIterator iterator = new CombinationIterator("abc", 2); // creates the iterator.
16-
* iterator.next(); // returns "ab"
17-
* iterator.hasNext(); // returns true
18-
* iterator.next(); // returns "ac"
19-
* iterator.hasNext(); // returns true
20-
* iterator.next(); // returns "bc"
21-
* iterator.hasNext(); // returns false
22-
*
23-
* Constraints:
24-
* 1 <= combinationLength <= characters.length <= 15
25-
* There will be at most 10^4 function calls per test.
26-
* It's guaranteed that all calls of the function next are valid.
27-
* */
286
public class _1286 {
297
public static class Solution1 {
308
public static class CombinationIterator {

0 commit comments

Comments
 (0)