Combinations without repetition (lexicographic)
Tests
| Test |
Method name |
Duration |
Result |
| Count matches known value: C(12,3) = 220 |
countMatchesKnownValue() |
0.001s |
passed |
| Returned arrays are defensive copies (immutability) |
defensiveCopies() |
0s |
passed |
| Edge case k=n yields exactly one combination [0,1,...,n-1] |
edgeCaseKEqualsN() |
0s |
passed |
| Edge case k=0 yields one empty combination |
edgeCaseKZero() |
0s |
passed |
| Invalid arguments throw IllegalArgumentException |
invalidArgs() |
0.001s |
passed |
| Iterator respects hasNext()/next() contract and throws on exhaustion |
iteratorContract() |
0s |
passed |
| Generates lexicographic combinations for n=4, k=2 |
lexOrderN4K2() |
0s |
passed |