apple / swift-algorithms

Commonly used sequence and collection algorithms for Swift
Apache License 2.0
5.97k stars 443 forks source link

Fix stablePartition(subrange:by:) using subrange count instead of entire collection count. #30

Closed pmtao closed 4 years ago

pmtao commented 4 years ago

Function stablePartition(subrange:by:) in Partition should not using the collection count which will cause bound error, but using subrange count.

Checklist

kylemacomber commented 4 years ago

Good catch!

natecook1000 commented 4 years ago

Thanks for this fix, @pmtao! :clap::clap::clap: