Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit665c0a1

Browse files
refactor 1286
1 parentc58b3bb commit665c0a1

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
importjava.util.ArrayList;
44
importjava.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
publicclass_1286 {
297
publicstaticclassSolution1 {
308
publicstaticclassCombinationIterator {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp