Skip to content

Add count --largest K - #2

Merged
Gulliby merged 1 commit into
mainfrom
feature/youngkit-count-largest
Nov 4, 2026
Merged

Gulliby merged 1 commit into
mainfrom
feature/youngkit-count-largest

Conversation

@Gulliby

@Gulliby Gulliby commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Requested by gulliby

Before: youngkit count N could only limit the largest part (--max-part K, at most K) or require distinct parts.

After: youngkit count N --largest K counts the partitions of N whose largest part is exactly K. The output has one more line, largest, that shows K. --largest and --max-part exclude each other and exit 2 with a message. The usage line and the README describe the new option. 285 top-level Go tests pass (280 before); go vet and gofmt -l report nothing.

How: internal/count/largest.go holds the count, and internal/cli/cmd_count.go reads the option. One new test file, internal/cli/count_largest_test.go, holds the cases. Four existing test lines change because they pin the usage text.

@Gulliby
Gulliby merged commit 160777e into main Nov 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant