Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2089 commits
Select commit Hold shift + click to select a range
bdda4fa
Handle negative input in perfect square checks (#7207)
asmitha-16 Jan 13, 2026
7148661
Feat/tournament sort (#7201)
GziXnine Jan 13, 2026
66f76eb
Add RotatedBinarySearch (search in rotated sorted array) (#7202)
GziXnine Jan 14, 2026
babc762
chore(deps-dev): bump com.mebigfatguy.fb-contrib:fb-contrib from 7.7.…
dependabot[bot] Jan 15, 2026
fd0bcb7
Add Middle of Linked List (Slow/Fast Pointers) (#7212)
GziXnine Jan 16, 2026
782d075
Improve documentation for Linear Search algorithm (#7214)
SwaatiR Jan 17, 2026
48f6322
docs: add Javadoc to FibonacciSeries (#7215)
Jan 17, 2026
79cdb98
Add input validation and clarify sorted array requirement in Binary S…
SwaatiR Jan 18, 2026
1b9373e
feat: add Bell Numbers algorithm using Aitken's Array (#7219)
Jan 19, 2026
109ed2e
feat: Add Prefix Sum category with 1D and 2D implementations (#7220)
Jan 19, 2026
7339b9d
Add distance between two points algorithm (#7218)
Gopesh111 Jan 19, 2026
ba5ccbe
chore(deps-dev): bump com.mebigfatguy.fb-contrib:fb-contrib from 7.7.…
dependabot[bot] Jan 20, 2026
1b014a2
style: include `UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NULL` (#7225)
vil02 Jan 20, 2026
0e8291e
style: include `UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL` (#…
vil02 Jan 21, 2026
0f9139d
style: include `UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS` …
vil02 Jan 22, 2026
a7eeee2
Fix: NumberFormatException with non-ASCII Unicode digits in MyAtoi (#…
vizahat36 Jan 22, 2026
1a7f8fe
style: include `UTAO_JUNIT_ASSERTION_ODDITIES_IMPOSSIBLE_NULL` (#7238)
vil02 Jan 23, 2026
0b0cefe
style: include `UTAO_JUNIT_ASSERTION_ODDITIES_ACTUAL_CONSTANT` (#7239)
vil02 Jan 24, 2026
6fdf2db
style: resolve some of the `UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_…
vil02 Jan 25, 2026
a3efc10
Docs/remove readme korean readme file (#7242)
DenizAltunkapan Jan 26, 2026
2ea3873
chore(deps-dev): bump org.assertj:assertj-core from 3.27.6 to 3.27.7 …
dependabot[bot] Jan 26, 2026
dc3d64f
feat: add Difference Array algorithm implementation and tests (#7244)
singhc7 Jan 27, 2026
11eec78
docs: Add comprehensive documentation to BinarySearch algorithm (#7245)
ghorpadeire Jan 30, 2026
f3fd9ca
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.0.0 to 13.1…
dependabot[bot] Jan 31, 2026
dfaa495
Refactor KMP and RabinKarp: Improve Reusability and Test Coverage (#7…
divyanshsaxena002 Feb 1, 2026
3e36833
add Subarray Sum Equals K using prefix sum (#7252)
ruturajjadhav07 Feb 1, 2026
c6703d3
chore(deps-dev): bump org.apache.maven.plugins:maven-compiler-plugin …
dependabot[bot] Feb 3, 2026
8e30bcb
refactor: clean up duplicate algorithm implementations to reduce main…
GziXnine Feb 3, 2026
a14b234
feat: add ElGamalCipher with Safe Prime generation and stateless desi…
singhc7 Feb 4, 2026
249b88f
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.1.0 to 13.2…
dependabot[bot] Feb 5, 2026
3835c48
Refactor: simplify validation and improve backtracking cleanup (#7258)
swativ15 Feb 5, 2026
8403b8f
fix:shape's dimension constraints added correctyl (issue id: #7260) …
Adarsh-Melath Feb 9, 2026
0c79d33
Add Tower of Hanoi recursive algorithm (#7235)
vizahat36 Feb 11, 2026
504b528
Refactor getAbsValue method to use Math.abs (#7266)
MuhammadMuneebMubashar Feb 13, 2026
c8d0291
chore(deps): bump org.junit:junit-bom from 6.0.2 to 6.0.3 (#7271)
dependabot[bot] Feb 16, 2026
dfa6bf0
style: remove redundant PMD exclusions (#7272)
vil02 Feb 17, 2026
1646eda
style: remove redundant exclusions (#7276)
vil02 Feb 18, 2026
c9bda3d
Add string algorithms: RemoveStars and ComplexNumberMultiply (#7275)
SYEDMDSAAD Feb 18, 2026
2ae1bdf
feat: add contains() method to DynamicArray (#7270)
Neha-2005-VCE Feb 18, 2026
0a2c7f2
style: include `BL_BURYING_LOGIC` (#7277)
vil02 Feb 18, 2026
29ce2ef
Add RangeSumQuery algorithm in prefix folder (#7280)
ruturajjadhav07 Feb 19, 2026
7c38e5a
style: include `DM_NEXTINT_VIA_NEXTDOUBLE` (#7282)
vil02 Feb 20, 2026
2d443a9
Add time and space complexity documentation to LongestNonRepetitiveSu…
eMohan07 Feb 21, 2026
109df1f
style: include `SUA_SUSPICIOUS_UNINITIALIZED_ARRAY` (#7285)
vil02 Feb 21, 2026
12935c2
Add Longest Repeated Substring algorithm (#7286)
caglareker Feb 22, 2026
10114b7
Add ReverseQueueRecursion.java: Reverse a Queue using recursion (#7281)
Vasundhara117 Feb 23, 2026
023f856
chore(deps-dev): bump org.apache.maven.plugins:maven-surefire-plugin …
dependabot[bot] Feb 23, 2026
7e5d9d4
feat: add HuffmanCoding with fail-fast validation and immutable desig…
singhc7 Feb 26, 2026
705eb52
Added volume of a pyramid frustum (#7291)
kvadrik Feb 27, 2026
ba286b2
chore(deps-dev): bump org.mockito:mockito-core from 5.21.0 to 5.22.0 …
dependabot[bot] Feb 27, 2026
0d2a98e
Added volume of a torus (#7294)
kvadrik Feb 28, 2026
d867288
Added surface area of a cuboid (#7293)
kvadrik Feb 28, 2026
4b04ad4
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.2.0 to 13.3…
dependabot[bot] Mar 2, 2026
9875648
feat: add TopKFrequentWords with deterministic tie-breaking (#7298) (…
oleksii-tumanov Mar 5, 2026
8b41533
Add Javadoc comments for AnyBaseToAnyBase class (#7301)
24wh1a05q3-creator Mar 6, 2026
9aa2544
Renamed method variables (#7296)
CasualProgrammer25 Mar 8, 2026
8e1f124
test: enhance GenericHashMapUsingArrayTest with comprehensive edge ca…
lmj798 Mar 11, 2026
5e06b15
chore(deps-dev): bump org.mockito:mockito-core from 5.22.0 to 5.23.0 …
dependabot[bot] Mar 11, 2026
8bbd090
Overlapping condition changed (#7314)
kvadrik Mar 14, 2026
24c2bea
Improve space complexity to O(1) in WordSearch. (#7308)
Maryamh12 Mar 14, 2026
7d57c57
Added quadratic mean (#7315)
kvadrik Mar 15, 2026
af1d9d1
feat(strings): add Kasai's algorithm for LCP array construction (#7324)
Keykyrios Mar 18, 2026
be02240
Improve InterpolationSearch documentation with example (#7336)
AbhiramSakha Mar 24, 2026
76c45c1
feat: add StockSpanProblem algorithm (#7312)
oleksii-tumanov Mar 24, 2026
010c955
Implement volume calculation for ellipsoid (#7338)
kvadrik Mar 25, 2026
2927595
Improve LinearSearch documentation with example and explanation (#7335)
AbhiramSakha Mar 25, 2026
ebcf5ad
Fix IterativeBinarySearch implementation and resolve build issues (#7…
AbhiramSakha Mar 26, 2026
cc75b5e
chore(deps): bump codecov/codecov-action from 5 to 6 in /.github/work…
dependabot[bot] Mar 26, 2026
92d4702
fix: handle null and empty array in LinearSearch (issue #7340) (#7347)
Senrian Mar 28, 2026
227355e
feat(graph): implement Tarjan's Bridge-Finding Algorithm (#7346)
Keykyrios Mar 28, 2026
8be7543
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.3.0 to 13.4…
dependabot[bot] Mar 29, 2026
5753f46
chore(deps-dev): bump com.github.spotbugs:spotbugs-maven-plugin from …
dependabot[bot] Mar 29, 2026
bdbbece
Improve JumpSearch documentation with detailed explanation and exampl…
Senrian Mar 30, 2026
d2744b5
Fixes #7350: Binary Search Reliability Improvement (#7351)
surajdm123 Mar 30, 2026
ee34336
Correlation function for discrete variable correlation (#7326)
kvadrik Mar 31, 2026
635d54a
fix(BinarySearch): add null key check to prevent NPE (fix #7356) (#7357)
Senrian Apr 1, 2026
9729e56
Use BigInteger to prevent overflow in factorial calculation (#7358)
VanshSharma3 Apr 1, 2026
f38d5cd
feat: add OptimalBinarySearchTree algorithm (#7310)
oleksii-tumanov Apr 3, 2026
b7e9c85
Enhance LinearSearch with null check for value (#7355)
AbhiramSakha Apr 4, 2026
abd1c47
Create Relativity.java (#7323)
kvadrik Apr 4, 2026
13aaad2
feat(strings): add MoveHashToEnd algorithm (#7313)
ShyamChavda005 Apr 5, 2026
741b2d1
Feat/segment tree 2d (#7363)
YassaTalaat80 Apr 6, 2026
7eea9a5
Fix: handle null key in IterativeBinarySearch (#7365)
kadambari25 Apr 6, 2026
49f9e1a
Improve readability in LinearSearch by using local variable (#7367)
kadambari25 Apr 8, 2026
5b9db67
Refactor Alphabetical implementation and tests (#7370)
felseje Apr 10, 2026
e0a7223
chore(deps): bump actions/github-script from 8 to 9 in /.github/workf…
dependabot[bot] Apr 11, 2026
1edf319
feat(maths): enhance Average with stream method and improved JavaDoc …
Papichardog Apr 11, 2026
79bc620
feat(geometry): add line segment intersection utility (#7376)
nickzerjeski Apr 13, 2026
df8fd85
docs: add edge cases to JumpSearch documentation (#7379)
prashantpiyush1111 Apr 14, 2026
14b6f99
test(searches): cover null input cases in IterativeBinarySearch (#7375)
nickzerjeski Apr 14, 2026
b3e31b5
feat(graph): add DSU-based account merge algorithm (#7377)
nickzerjeski Apr 15, 2026
0ad5d90
fix: remove malformed javadoc to fix -Werror build failure (#7393) (#…
Senrian Apr 22, 2026
763b95b
fix: aesencryption in AESEncryption.java (#7392)
orbisai0security Apr 22, 2026
35b94ab
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.4.0 to 13.4…
dependabot[bot] Apr 27, 2026
6db8e20
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.4.1 to 13.4…
dependabot[bot] May 2, 2026
2616e09
Update Anagrams.java (#7409)
Abdul-Rehman-svg May 3, 2026
54341c1
Optimized NQueens implementation using hashing (#7416)
Bhanubasyan May 8, 2026
e814d97
Added null check to EMAFilter (#7417)
Shalinihr1402 May 9, 2026
e7f8979
feat: add Rat in a Maze backtracking algorithm (#7418)
the-Sunny-Sharma May 13, 2026
0811cd0
[ENHANCEMENT] Add Wavelet Tree Data Structure (#7414)
space0032 May 15, 2026
783c96f
Fix: remove floating Javadoc comments causing compilation error (#7423)
BixbyCodes May 16, 2026
8848ed1
Docs: add Javadoc to CoinChange class and method (#7424)
BixbyCodes May 17, 2026
4b8099c
fix: add null input validation to AlternativeStringArrange.arrange() …
Shubh2-0 May 18, 2026
3ee310e
chore(deps): bump org.junit:junit-bom from 6.0.3 to 6.1.0 (#7431)
dependabot[bot] May 21, 2026
0a62b11
feat: add optimized Digit DP template and unit tests (#7430)
premmsharma122 May 21, 2026
e49cd55
feat(datastructures): add thread-safe bounded queue implementation (#…
MD-Mushfiqur123 May 25, 2026
42007c8
docs: improve LinearSearch documentation with examples and step-by-st…
07Vineet07 May 26, 2026
0905cbe
chore(deps-dev): bump org.apache.maven.plugins:maven-surefire-plugin …
dependabot[bot] May 27, 2026
7b1995f
chore: use `srz-zumix/setup-infer` (#7437)
vil02 May 28, 2026
978a306
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.4.2 to 13.5…
dependabot[bot] May 31, 2026
5feaba6
test: refactor MergeSortedArrayListTest using JUnit 5 parameterized t…
sawaleparas Jun 3, 2026
cecfad9
feat(matrix): add QR decomposition algorithm using Gram-Schmidt proce…
MD-Mushfiqur123 Jun 3, 2026
e514f72
chore(deps-dev): bump org.jacoco:jacoco-maven-plugin from 0.8.14 to 0…
dependabot[bot] Jun 5, 2026
ae861d6
chore(deps): bump codecov/codecov-action from 6 to 7 in /.github/work…
dependabot[bot] Jun 7, 2026
d792409
Rename and relocate trie autocomplete implementation (#7459)
Chandu0501 Jun 10, 2026
34079f0
test(dp): add tests for LongestPalindromicSubsequence and remove main…
amangupta982 Jun 10, 2026
6fbbc94
chore(deps-dev): bump com.github.spotbugs:spotbugs-maven-plugin from …
dependabot[bot] Jun 10, 2026
0388455
Add LongestCommonSubstring Implementation (#7464)
Rosander0 Jun 14, 2026
bf8f3bd
feat: add count distinct elements in window algorithm (#7463)
SyedAbd110786 Jun 15, 2026
b3fcb12
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.5.0 to 13.6…
dependabot[bot] Jun 15, 2026
8e374d3
Add PerrinNumber Implementation (#7478)
Rosander0 Jun 18, 2026
bf0ff70
Add JacobsthalNumber Implementation (#7479)
Rosander0 Jun 18, 2026
8a3bd3a
chore(deps): bump actions/checkout from 6 to 7 in /.github/workflows …
dependabot[bot] Jun 18, 2026
fafc5a2
chore: move HeavyLightDecomposition to datastructures/trees (#7485)
priyanshuvishwakarma273403 Jun 20, 2026
e57a675
Fix division by zero in interpolation search (#7484)
priyanshuvishwakarma273403 Jun 20, 2026
631eae3
Add PadovanSequence Implementation (#7477)
Rosander0 Jun 20, 2026
a508fd2
Add FriendlyNumber Implementation (#7474)
Rosander0 Jun 22, 2026
0fe06ac
fix: validate that all characters after first padding character in B…
priyanshuvishwakarma273403 Jun 22, 2026
00339c7
refactor: unify Dijkstra on efficient PriorityQueue implementation (#…
priyanshuvishwakarma273403 Jun 23, 2026
0e001b7
Add SociableNumber Implementation (#7475)
Rosander0 Jun 23, 2026
51137a1
refactor: review and group scattered palindrome implementation (#7487)
priyanshuvishwakarma273403 Jun 24, 2026
31caee6
Add TitleCase Implementation (#7473)
Rosander0 Jun 25, 2026
ef986c4
DisariumNumber (#7490)
amogh-patwari Jun 26, 2026
0d29e7c
SelectionSort: add missing Javadoc for class and findIndexOfMin metho…
JulianGStudium Jun 27, 2026
e3692c7
docs: cross-reference nth-fibonacci implementations via javadocs (#7497)
DishaSethi Jun 27, 2026
d4ffef7
Remove duplicate Dijkstra implementation in others directory (#7500)
Sim20004 Jun 29, 2026
676175d
chore(deps): bump org.junit:junit-bom from 6.1.0 to 6.1.1 (#7501)
dependabot[bot] Jun 29, 2026
12aab70
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.6.0 to 13.7…
dependabot[bot] Jun 29, 2026
c6fa50f
docs: correct stale WiggleSort Javadoc — [1, 2, 2] is already detecte…
herley-shaori Jul 3, 2026
12ea4bb
fix: Caesar cipher produces non-alphabetic output for negative shifts…
herley-shaori Jul 3, 2026
8304c1e
fix: this dependabot configuration does not set a co... in... (#7510)
orbisai0security Jul 4, 2026
c498379
chore(deps): bump github/codeql-action from 4 to 4.36.2 in /.github/w…
dependabot[bot] Jul 4, 2026
80fc2bd
chore(deps): bump actions/setup-java from 5 to 5.4.0 in /.github/work…
dependabot[bot] Jul 7, 2026
fd2858e
chore(deps): bump github/codeql-action from 4.36.2 to 4.36.3 in /.git…
dependabot[bot] Jul 9, 2026
9673483
chore(deps): bump actions/stale from 10 to 10.3.0 in /.github/workflo…
dependabot[bot] Jul 10, 2026
9b16a48
Enhance Javadoc for AccountMerge (#7523)
akankshanimmagadda Jul 13, 2026
0125123
chore(deps): bump actions/setup-java from 5.4.0 to 5.5.0 in /.github/…
dependabot[bot] Jul 15, 2026
e45b6ac
chore(deps): bump github/codeql-action from 4.36.3 to 4.37.0 in /.git…
dependabot[bot] Jul 15, 2026
406347c
chore(deps): bump actions/stale from 10.3.0 to 10.4.0 in /.github/wor…
dependabot[bot] Jul 16, 2026
93cf85e
Add LinearRegression Implementation (#7520)
Rosander0 Jul 19, 2026
53fc764
chore(deps): bump actions/setup-python from 6 to 6.3.0 in /.github/wo…
dependabot[bot] Jul 20, 2026
f34cbbf
Add LibrarySort Implementation (#7481)
Rosander0 Jul 20, 2026
b377677
chore(deps): bump org.junit:junit-bom from 6.1.1 to 6.1.2 (#7529)
dependabot[bot] Jul 20, 2026
742162c
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.7.0 to 13.8…
dependabot[bot] Jul 20, 2026
ceb7839
chore(deps-dev): bump com.github.spotbugs:spotbugs-maven-plugin from …
dependabot[bot] Jul 20, 2026
8a20fa9
chore(deps): bump actions/setup-java from 5.5.0 to 5.6.0 in /.github/…
dependabot[bot] Jul 21, 2026
e9f11bb
Fix incorrect absolute minimum calculation (#7536)
klerk1t Jul 23, 2026
af9aad3
chore(deps): bump github/codeql-action from 4.37.0 to 4.37.1 in /.git…
dependabot[bot] Jul 24, 2026
ef61ee8
fix: reject negative input in SumOfSquares and add tests (#7543)
lieutenant-Rohit Jul 26, 2026
ad1de6b
chore(deps): bump actions/setup-python from 6.3.0 to 7.0.0 in /.githu…
dependabot[bot] Jul 27, 2026
cceeac7
Add rotting oranges (#7542)
rsemwal1711 Jul 28, 2026
ee869b4
chore(deps): bump github/codeql-action from 4.37.1 to 4.37.2 in /.git…
dependabot[bot] Jul 28, 2026
38ff681
chore(deps): bump github/codeql-action from 4.37.2 to 4.37.3 in /.git…
dependabot[bot] Jul 29, 2026
f0b7778
Add MultinomialNaiveBayesClassifier Implementation (#7532)
Rosander0 Jul 31, 2026
1f4e2f8
Add Concurrent Merge Sort Implementation (#7544)
anshullakra007 Jul 31, 2026
7c934ad
Reject null BitonicSort input explicitly (#7550)
cragkhit Aug 2, 2026
90f4231
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.8.0 to 13.9…
dependabot[bot] Aug 3, 2026
ec0f2cd
chore(deps): bump actions/stale from 10.4.0 to 11.0.0 in /.github/wor…
dependabot[bot] Aug 3, 2026
171bdc5
Fix infinite loop in JumpSearch when key exceeds last element (#7555)
SEPURI-SAI-KRISHNA Aug 5, 2026
55f551b
Fix ExponentialSearch missing boundary elements and not returning -1 …
SEPURI-SAI-KRISHNA Aug 5, 2026
0b0f921
Fix out-of-bounds access and identity comparison in FibonacciSearch (…
SEPURI-SAI-KRISHNA Aug 5, 2026
a521d93
chore(deps): bump actions/setup-java from 5.6.0 to 5.7.0 in /.github/…
dependabot[bot] Aug 9, 2026
77be010
chore(deps): bump github/codeql-action from 4.37.3 to 4.37.4 in /.git…
dependabot[bot] Aug 9, 2026
8e456f6
chore(deps): bump github/codeql-action from 4.37.4 to 4.37.5 in /.git…
dependabot[bot] Aug 11, 2026
bc41b64
chore(deps): bump org.apache.commons:commons-collections4 from 4.5.0 …
dependabot[bot] Aug 11, 2026
fdfb9a3
chore(deps): bump github/codeql-action from 4.37.5 to 4.37.6 in /.git…
dependabot[bot] Aug 12, 2026
346f591
chore(deps): bump org.junit:junit-bom from 6.1.2 to 6.1.3 (#7571)
dependabot[bot] Aug 14, 2026
a0f6b0d
fix: RailFenceCipher silently drops newline characters (#7572)
SEPURI-SAI-KRISHNA Aug 15, 2026
a050916
fix: off-by-one bounds guards in SegmentTree (#7573)
SEPURI-SAI-KRISHNA Aug 16, 2026
56e2699
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.9.0 to 13.1…
dependabot[bot] Aug 17, 2026
3ddd052
fix: integer overflow in MobiusFunction (#7574)
SEPURI-SAI-KRISHNA Aug 19, 2026
65b977e
chore(deps): bump github/codeql-action from 4.37.6 to 4.37.7 in /.git…
dependabot[bot] Aug 21, 2026
9d05db2
feat(datastructures): add SelfOrganizingLinkedList implementation and…
amogh-patwari Aug 21, 2026
43aa81a
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.10.0 to 13.…
dependabot[bot] Aug 25, 2026
0be0e71
chore(deps): bump com.puppycrawl.tools:checkstyle from 13.11.0 to 14.…
dependabot[bot] Aug 26, 2026
433ac59
chore(deps-dev): bump com.github.spotbugs:spotbugs-maven-plugin from …
dependabot[bot] Aug 28, 2026
9a13ce0
chore(deps): bump github/codeql-action from 4.37.7 to 4.37.8 in /.git…
dependabot[bot] Aug 29, 2026
ffb3bed
chore(deps): bump actions/setup-java from 5.7.0 to 6.0.0 in /.github/…
dependabot[bot] Sep 1, 2026
6ec6339
chore(deps): bump github/codeql-action from 4.37.8 to 4.37.9 in /.git…
dependabot[bot] Sep 3, 2026
0a6c756
Add K-Nearest Neighbors classifier (#7563)
poorva0405 Sep 4, 2026
14c8db8
feat: add SlidingWindowAggregator, a ring buffer with windowed aggreg…
alxkm Sep 6, 2026
8f08a92
chore(deps): bump com.puppycrawl.tools:checkstyle from 14.0.0 to 14.1…
dependabot[bot] Sep 8, 2026
06f0480
chore(deps-dev): bump org.apache.maven.plugins:maven-compiler-plugin …
dependabot[bot] Sep 8, 2026
1c0c7c0
chore(deps-dev): bump org.apache.maven.plugins:maven-surefire-plugin …
dependabot[bot] Sep 8, 2026
ad10eda
feat: add KalmanFilter, a scalar Kalman filter with sensor fusion (…
alxkm Sep 8, 2026
8abfcf7
feat: add CusumDetector, cumulative sum change detection for streams …
alxkm Sep 8, 2026
d93d0ea
feat: add HampelFilter, robust outlier replacement for streams (#7598)
alxkm Sep 9, 2026
1f08afb
feat: add EwmaChangeDetector, an EWMA control chart for streams (#7600)
alxkm Sep 9, 2026
a097a28
feat: add WelfordAlgorithm, online mean and variance in one pass (#7602)
alxkm Sep 11, 2026
c99b056
feat: add P2QuantileEstimator, one quantile of a stream in constant m…
alxkm Sep 12, 2026
b6fb8ad
chore(deps-dev): bump com.github.spotbugs:spotbugs-maven-plugin from …
dependabot[bot] Sep 15, 2026
d652955
chore(deps): bump actions/setup-java from 6.0.0 to 6.0.1 in /.github/…
dependabot[bot] Sep 17, 2026
b3a96d2
chore(deps): bump github/codeql-action from 4.37.9 to 4.38.0 in /.git…
dependabot[bot] Sep 17, 2026
734a7a4
Fix integer overflow in AbsoluteValue.getAbsValue for Integer.MIN_VAL…
waffels4life Sep 17, 2026
a0c3eb5
feat: add Adwin, an adaptive window that cuts itself when the stream …
alxkm Sep 17, 2026
6bdb1ac
Sigmoid Activation function implementation with simplified batch calc…
crapxxi Sep 19, 2026
87edc62
feat: add GeneralizedEsd, Rosner's test for up to r outliers (#7612)
alxkm Sep 22, 2026
b2b9d3a
perf(strings): optimize LongestCommonSubstring DP memory to O(N) and …
irenemrtinez Sep 22, 2026
deb3d77
feat: add ComplementaryFilter, fusing a drifting rate with a noisy ab…
alxkm Sep 22, 2026
dd8df80
feat: add ExtendedKalmanFilter, the Kalman filter for a nonlinear mod…
alxkm Sep 24, 2026
6ed9243
docs: fix typos in comments (#7616)
jxpark24 Sep 25, 2026
4b58d36
feat(ciphers): add Lamport one-time signature (#7617)
nitin1053 Sep 25, 2026
3027ce1
Add Perceptron binary classifier (#7601)
Th-Shivam Sep 25, 2026
743ff5e
chore(deps): bump github/codeql-action from 4.38.0 to 4.38.1 in /.git…
dependabot[bot] Sep 26, 2026
d291e7d
feat: add DynamicTimeWarping, alignment distance with a Sakoe-Chiba b…
alxkm Sep 27, 2026
550a7ed
Feature/winternitz ots (#7621)
dilaraacetin Sep 27, 2026
3f06708
feat: add UnscentedKalmanFilter, the Kalman filter that samples the m…
alxkm Sep 29, 2026
1c22ba6
chore(deps-dev): bump org.mockito:mockito-core from 5.23.0 to 5.24.0 …
dependabot[bot] Oct 1, 2026
b33b75b
chore(deps): bump github/codeql-action from 4.38.1 to 4.38.2 in /.git…
dependabot[bot] Oct 2, 2026
ed2928f
fix: avoid out-of-bounds access in HowManyTimesRotated on small/unrot…
Saadanjum0 Oct 2, 2026
030d3dd
Improve rotated binary search edge cases (#7623)
sohamcodes-ctrl Oct 2, 2026
2105b56
chore(deps): bump org.apache.commons:commons-lang3 from 3.20.0 to 3.2…
dependabot[bot] Oct 3, 2026
922c4d3
feat(ciphers): add Merkle signature scheme (#7629)
dilaraacetin Oct 4, 2026
2fdcde7
Feature/lwe encryption (#7631)
dilaraacetin Oct 4, 2026
68dc5f5
fix: preserve KDTree deletion traversal and split invariants (#7633)
tianrking Oct 4, 2026
26db7ba
Feature/hors signature (#7635)
dilaraacetin Oct 5, 2026
f5772e3
chore(deps): bump com.puppycrawl.tools:checkstyle from 14.1.0 to 14.3…
dependabot[bot] Oct 6, 2026
9d9e348
Add Fenwick tree implementation and tests (#7637)
Rohan45create Oct 6, 2026
cb6f438
test: add white-box unit tests for Luhn.luhnCheck (#7641)
datpp Oct 9, 2026
5eb9d66
feat: add TDigest, every quantile of a stream from one sketch (#7642)
alxkm Oct 9, 2026
e43ec38
Add Duval's Lyndon factorization algorithm (#7639)
vedant0517 Oct 10, 2026
8dbdc51
chore(deps): bump github/codeql-action from 4.38.2 to 4.38.3 in /.git…
dependabot[bot] Oct 16, 2026
0ab1124
chore: remove accidental file breaking Windows checkout (#7646)
kaanhascan Oct 19, 2026
d9b86d1
chore(deps-dev): bump com.github.spotbugs:spotbugs-maven-plugin from …
dependabot[bot] Oct 19, 2026
f8207cc
fix(searches): support duplicates and null safety in LowerBound and U…
hardikkaurani Oct 21, 2026
ff36004
fix(searches): refine recursion bounds and add null safety to Ternary…
hardikkaurani Oct 21, 2026
18c99d9
fix(searches): handle null array safely and eliminate raw type warnin…
hardikkaurani Oct 21, 2026
3c3f04e
fix(searches): add null safety and make ExponentialSearch public (#7651)
hardikkaurani Oct 21, 2026
b526730
chore(deps): bump actions/setup-java from 6.0.1 to 6.1.0 in /.github/…
dependabot[bot] Oct 22, 2026
2994ec3
fix(searches): fix null element skipping in SentinelLinearSearch (#7654)
hardikkaurani Oct 22, 2026
3d71df9
chore(deps): bump github/codeql-action from 4.38.3 to 4.39.0 in /.git…
dependabot[bot] Oct 24, 2026
773d745
Improve Javadoc for LinearSearch find method (#7657)
anweshabehera-arch Oct 24, 2026
862de93
Update README to clarify directory content (#7658)
rashmivanneladas-arch Oct 25, 2026
2dd1a0a
Add Booth's algorithm for minimal string rotation (#7644)
vedant0517 Oct 25, 2026
976cebc
fix(searches): add null safety and Comparable consistency to JumpSear…
hardikkaurani Oct 25, 2026
96ed2d7
fix(searches): support rectangular matrices and null safety in Search…
hardikkaurani Oct 25, 2026
12f69b3
fix(sorts): keep duplicate values in TreeSort (#7661)
Rishavbhattarai Oct 27, 2026
6f19dd4
fix(sorts): stop SwapSort looping forever on duplicate values (#7660)
Rishavbhattarai Oct 27, 2026
bd64e8d
fix(sorts): handle small arrays in FlashSort and empty arrays in Dutc…
Rishavbhattarai Oct 27, 2026
a7a2441
fix(strings): use case-insensitive shift table in HorspoolSearch.find…
Rishavbhattarai Oct 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add GeneralizedEsd, Rosner's test for up to r outliers (TheAlgo…
…rithms#7612)

Grubbs' test asks whether the single most extreme point is an outlier and breaks as soon as there are two of them, because each one inflates the standard deviation the other is measured against. The generalized extreme Studentized deviate test removes the most extreme point, recomputes the statistics on what is left and repeats r times, and the answer is the largest step whose statistic exceeds its critical value rather than the first, which is what defeats that masking.

The critical values need a Student t quantile, which the repository did not have, so the class computes it from the regularized incomplete beta function through a Lentz continued fraction and a Lanczos log gamma, inverted by bisection. No table is needed. The tests check the critical values and the number of outliers against Rosner's published 54 point example.

Signed-off-by: alxkm <19151554+alxkm@users.noreply.github.com>
Co-authored-by: alxkm <19151554+alxkm@users.noreply.github.com>
  • Loading branch information
alxkm and alxkm authored Sep 22, 2026
commit 87edc628aa92ce6dd7e9a14aece6f19355e7dd3a
334 changes: 334 additions & 0 deletions src/main/java/com/thealgorithms/streaming/GeneralizedEsd.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
package com.thealgorithms.streaming;

import java.util.Arrays;

/**
* The <b>generalized extreme Studentized deviate test</b> of Rosner: finds up to {@code r} outliers
* in a sample, without being told how many are there.
*
* <p>Grubbs' test asks whether the single most extreme point is an outlier, and it breaks as soon as
* there are two of them: each one inflates the standard deviation the other is measured against, so
* a pair of outliers can hide one another completely. This is the masking problem, and the
* generalized test is the standard answer to it. It removes the most extreme point, recomputes the
* statistics on what is left, and repeats {@code r} times:
*
* <pre>
* R_i = max |x - mean| / sd over the points that are still in
* lambda_i = (n - i) * t / sqrt( (n - i - 1 + t^2)(n - i + 1) )
* where t = the 1 - alpha / (2(n - i + 1)) quantile of a t distribution with n - i - 1 degrees of freedom
* </pre>
*
* <p>The number of outliers is the <i>largest</i> {@code i} whose statistic exceeds its critical
* value, not the first one. That is what defeats masking: in a sample with three outliers the first
* two tests can easily fall short while the third one succeeds, and the test then reports all three.
*
* <p>This is a batch test and it needs the whole sample, which is exactly the trade it makes against
* the streaming detectors in this package: it has a stated significance level and it decides how many
* points are outliers, where {@link HampelFilter} answers one sample at a time against a threshold the
* caller has to choose. Rosner's own recommendation is to use it on at least 25 points, and {@code r}
* is an upper bound that may be set generously, because overstating it costs accuracy only in extreme
* cases.
*
* <h2>Usage</h2>
*
* <pre>{@code
* GeneralizedEsd test = new GeneralizedEsd(0.05);
* int[] outliers = test.findOutliers(sample, 10);
* }</pre>
*
* <p>The test costs O(r * n) time and allocates O(n). The t quantile behind the critical value is
* computed from the regularized incomplete beta function, so no table is needed.
*
* @see HampelFilter
* @see <a href="https://en.wikipedia.org/wiki/Grubbs%27s_test">Grubbs's test and its generalization</a>
*/
public final class GeneralizedEsd {

/** Significance level used when none is given. */
public static final double DEFAULT_SIGNIFICANCE_LEVEL = 0.05;

private static final int MINIMUM_SAMPLE_SIZE = 3;
private static final double[] LANCZOS = {
0.99999999999980993,
676.5203681218851,
-1259.1392167224028,
771.32342877765313,
-176.61502916214059,
12.507343278686905,
-0.13857109526572012,
9.9843695780195716e-6,
1.5056327351493116e-7,
};

private final double significanceLevel;

/**
* Creates a test at the customary significance level of {@code 0.05}.
*/
public GeneralizedEsd() {
this(DEFAULT_SIGNIFICANCE_LEVEL);
}

/**
* Creates a test.
*
* @param significanceLevel the probability of declaring an outlier in clean data, in {@code (0, 1)}
* @throws IllegalArgumentException if {@code significanceLevel} is not inside {@code (0, 1)}
*/
public GeneralizedEsd(double significanceLevel) {
if (!(significanceLevel > 0.0) || !(significanceLevel < 1.0)) {
throw new IllegalArgumentException("The significance level must lie in (0, 1), but was " + significanceLevel);
}
this.significanceLevel = significanceLevel;
}

/**
* Finds the outliers of a sample.
*
* @param sample the data to inspect, left untouched
* @param maxOutliers upper bound on the number of outliers, at least one and at most
* {@code sample.length - 2}
* @return the indices of the outliers in ascending order, empty if the sample looks clean
* @throws IllegalArgumentException if the sample holds fewer than three points or a non-finite
* value, or if {@code maxOutliers} is out of range
* @throws NullPointerException if {@code sample} is {@code null}
*/
public int[] findOutliers(double[] sample, int maxOutliers) {
if (sample.length < MINIMUM_SAMPLE_SIZE) {
throw new IllegalArgumentException("The sample must hold at least " + MINIMUM_SAMPLE_SIZE + " points, but held " + sample.length);
}
if (maxOutliers < 1 || maxOutliers > sample.length - 2) {
throw new IllegalArgumentException("The number of outliers to look for must lie in [1, " + (sample.length - 2) + "], but was " + maxOutliers);
}
for (double value : sample) {
if (!Double.isFinite(value)) {
throw new IllegalArgumentException("Samples must be finite, but was " + value);
}
}

int size = sample.length;
double[] values = Arrays.copyOf(sample, size);
int[] indices = new int[size];
for (int i = 0; i < size; i++) {
indices[i] = i;
}

int[] removed = new int[maxOutliers];
int outliers = 0;
int remaining = size;

for (int step = 1; step <= maxOutliers; step++) {
double mean = mean(values, remaining);
double deviation = standardDeviation(values, remaining, mean);
if (deviation == 0.0) {
break;
}

int worst = indexOfLargestDeviation(values, remaining, mean);
double statistic = Math.abs(values[worst] - mean) / deviation;
removed[step - 1] = indices[worst];
if (statistic > criticalValue(size, step)) {
outliers = step;
}

remaining--;
values[worst] = values[remaining];
indices[worst] = indices[remaining];
}

int[] result = Arrays.copyOf(removed, outliers);
Arrays.sort(result);
return result;
}

/**
* Returns the critical value a statistic has to exceed at one step of the test.
*
* @param sampleSize the size of the whole sample
* @param step which removal this is, counting from one
* @return the critical value, that is {@code lambda_i}
* @throws IllegalArgumentException if {@code sampleSize} is smaller than three, or if {@code step}
* is outside {@code [1, sampleSize - 2]}
*/
public double criticalValue(int sampleSize, int step) {
if (sampleSize < MINIMUM_SAMPLE_SIZE) {
throw new IllegalArgumentException("The sample size must be at least " + MINIMUM_SAMPLE_SIZE + ", but was " + sampleSize);
}
if (step < 1 || step > sampleSize - 2) {
throw new IllegalArgumentException("The step must lie in [1, " + (sampleSize - 2) + "], but was " + step);
}
int size = sampleSize - step + 1;
int degreesOfFreedom = size - 2;
double probability = 1.0 - significanceLevel / (2.0 * size);
double t = studentTQuantile(probability, degreesOfFreedom);
return (size - 1) * t / Math.sqrt((degreesOfFreedom + t * t) * size);
}

/**
* Returns the significance level of the test.
*
* @return the level given at construction time
*/
public double significanceLevel() {
return significanceLevel;
}

@Override
public String toString() {
return "GeneralizedEsd{significanceLevel=" + significanceLevel + "}";
}

private static double mean(double[] values, int size) {
double sum = 0.0;
for (int i = 0; i < size; i++) {
sum += values[i];
}
return sum / size;
}

private static double standardDeviation(double[] values, int size, double mean) {
double sum = 0.0;
for (int i = 0; i < size; i++) {
double deviation = values[i] - mean;
sum += deviation * deviation;
}
return Math.sqrt(sum / (size - 1));
}

private static int indexOfLargestDeviation(double[] values, int size, double mean) {
int worst = 0;
double largest = -1.0;
for (int i = 0; i < size; i++) {
double deviation = Math.abs(values[i] - mean);
if (deviation > largest) {
largest = deviation;
worst = i;
}
}
return worst;
}

/**
* Returns the {@code probability} quantile of a t distribution, found by bisecting its cumulative
* distribution function.
*
* @param probability the probability to invert, in {@code (0, 1)}
* @param degreesOfFreedom the degrees of freedom, at least one
* @return the quantile
*/
private static double studentTQuantile(double probability, int degreesOfFreedom) {
if (probability < 0.5) {
return -studentTQuantile(1.0 - probability, degreesOfFreedom);
}
double low = 0.0;
double high = 1.0;
while (studentTCumulative(high, degreesOfFreedom) < probability && high < 1e12) {
high *= 2.0;
}
for (int i = 0; i < 200; i++) {
double middle = 0.5 * (low + high);
if (studentTCumulative(middle, degreesOfFreedom) < probability) {
low = middle;
} else {
high = middle;
}
}
return 0.5 * (low + high);
}

/**
* Returns the probability that a t distributed variable stays below {@code t}.
*
* @param t the point to evaluate at
* @param degreesOfFreedom the degrees of freedom, at least one
* @return the cumulative probability
*/
private static double studentTCumulative(double t, int degreesOfFreedom) {
double x = degreesOfFreedom / (degreesOfFreedom + t * t);
double tail = 0.5 * regularizedIncompleteBeta(0.5 * degreesOfFreedom, 0.5, x);
return t >= 0.0 ? 1.0 - tail : tail;
}

/**
* Returns the regularized incomplete beta function, evaluated with the continued fraction of
* Lentz.
*
* @param a first shape parameter, strictly positive
* @param b second shape parameter, strictly positive
* @param x the point to evaluate at, in {@code [0, 1]}
* @return {@code I_x(a, b)}
*/
private static double regularizedIncompleteBeta(double a, double b, double x) {
if (x <= 0.0) {
return 0.0;
}
if (x >= 1.0) {
return 1.0;
}
double logBeta = logGamma(a) + logGamma(b) - logGamma(a + b);
if (x < (a + 1.0) / (a + b + 2.0)) {
return Math.exp(a * Math.log(x) + b * Math.log1p(-x) - logBeta) * betaContinuedFraction(a, b, x) / a;
}
return 1.0 - Math.exp(b * Math.log1p(-x) + a * Math.log(x) - logBeta) * betaContinuedFraction(b, a, 1.0 - x) / b;
}

private static double betaContinuedFraction(double a, double b, double x) {
double tiny = 1e-300;
double c = 1.0;
double d = 1.0 - (a + b) * x / (a + 1.0);
if (Math.abs(d) < tiny) {
d = tiny;
}
d = 1.0 / d;
double fraction = d;

for (int m = 1; m <= 300; m++) {
int even = 2 * m;
double numerator = m * (b - m) * x / ((a + even - 1.0) * (a + even));
d = 1.0 + numerator * d;
if (Math.abs(d) < tiny) {
d = tiny;
}
c = 1.0 + numerator / c;
if (Math.abs(c) < tiny) {
c = tiny;
}
d = 1.0 / d;
fraction *= d * c;

numerator = -(a + m) * (a + b + m) * x / ((a + even) * (a + even + 1.0));
d = 1.0 + numerator * d;
if (Math.abs(d) < tiny) {
d = tiny;
}
c = 1.0 + numerator / c;
if (Math.abs(c) < tiny) {
c = tiny;
}
d = 1.0 / d;
double step = d * c;
fraction *= step;

if (Math.abs(step - 1.0) < 1e-15) {
break;
}
}
return fraction;
}

/**
* Returns the logarithm of the gamma function, using the Lanczos approximation.
*
* @param x the point to evaluate at, strictly positive
* @return {@code log(gamma(x))}
*/
private static double logGamma(double x) {
double shifted = x - 1.0;
double series = LANCZOS[0];
for (int i = 1; i < LANCZOS.length; i++) {
series += LANCZOS[i] / (shifted + i);
}
double t = shifted + 7.5;
return 0.5 * Math.log(2.0 * Math.PI) + (shifted + 0.5) * Math.log(t) - t + Math.log(series);
}
}
Loading