feat: add Bell Numbers algorithm using Aitken's Array#7219
Merged
DenizAltunkapan merged 4 commits intoTheAlgorithms:masterfrom Jan 19, 2026
Merged
feat: add Bell Numbers algorithm using Aitken's Array#7219DenizAltunkapan merged 4 commits intoTheAlgorithms:masterfrom
DenizAltunkapan merged 4 commits intoTheAlgorithms:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7219 +/- ##
============================================
+ Coverage 79.05% 79.06% +0.01%
- Complexity 6946 6952 +6
============================================
Files 779 780 +1
Lines 22908 22921 +13
Branches 4502 4506 +4
============================================
+ Hits 18110 18123 +13
Misses 4077 4077
Partials 721 721 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
DenizAltunkapan
approved these changes
Jan 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the Bell Numbers algorithm (
BellNumbers.java), which counts the number of possible partitions of a set.Implementation Details:
Implements the Bell Triangle (Aitken's Array) method.
Complexity:$O(n^2)$ Time / $O(n^2)$ Space.
Safety: Added a guard clause to throw$B_{26}$ exceeds the range of a 64-bit Java
IllegalArgumentExceptionforn > 25, aslong.Testing: Added
BellNumbersTest.javawith 6 unit tests covering:longcapacity (I have read CONTRIBUTING.md.
This pull request is all my own work -- I have not plagiarized it.
All filenames are in PascalCase.
All functions and variable names follow Java naming conventions.
All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
All new algorithms include a corresponding test class that validates their functionality.
All new code is formatted with
clang-format -i --style=file path/to/your/file.java