Combinations without repetition in Gray order
Tests
| Test |
Method name |
Duration |
Result |
| Returned arrays are defensive copies (Gray) |
defensiveCopiesGray() |
0s |
passed |
| Edge cases: k=0 yields one empty; k=n yields [0..n-1] (Gray) |
edgeCasesGray() |
0.001s |
passed |
| Gray order adjacency: successive k-subsets differ by swapping exactly one element |
grayAdjacencyProperty() |
0.001s |
passed |
| Edge case k=n (Gray): emits [0..n-1] once and exhausts |
grayEdgeCaseKEqualsN() |
0.001s |
passed |
| Invalid arguments still throw when requesting Gray order |
invalidArgsGray() |
0.001s |
passed |
| Iterator respects hasNext()/next() and throws on exhaustion (Gray) |
iteratorContractGray() |
0.003s |
passed |
| Independent iterators in Gray order advance independently |
iteratorIndependenceGray() |
0s |
passed |
| Gray and lex enumerations produce the same set of combinations (no dupes, no misses) |
sameCoverageAsLex() |
0.001s |
passed |