PHPackages                             frowhy/algorithm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. frowhy/algorithm

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

frowhy/algorithm
================

八大排序算法

1.1(9y ago)25329apachePHP

Since Apr 4Pushed 9y ago2 watchersCompare

[ Source](https://github.com/frowhy/php-sort-algorithm)[ Packagist](https://packagist.org/packages/frowhy/algorithm)[ RSS](/packages/frowhy-algorithm/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (0)

Algorithm
=========

[](#algorithm)

Installation
------------

[](#installation)

The preferred method of installation is via [Packagist](https://packagist.org/) and [Composer](https://getcomposer.org/). Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require frowhy/algorithm
```

Example
-------

[](#example)

```
use Frowhy\Algorithm\Algorithm;

require_once __DIR__ . '/vendor/autoload.php';

$total = 20;
$arr   = [];
for ($i = 0; $i < $total; $i++) {
    $arr[] = rand(-10000, 10000);
}

$quickSort     = Algorithm::quickSort($arr);
$bubbleSort    = Algorithm::bubbleSort($arr);
$selectionSort = Algorithm::selectionSort($arr);
$insertionSort = Algorithm::insertionSort($arr);
$shellSort     = Algorithm::shellSort($arr);
$mergeSort     = Algorithm::mergeSort($arr);
$countingSort  = Algorithm::countingSort($arr);
$heapSort      = Algorithm::heapSort($arr);

print_r([
            '原数组'  => $arr,
            '快速排序' => $quickSort,
            '冒泡排序' => $bubbleSort,
            '选择排序' => $selectionSort,
            '插值排序' => $insertionSort,
            '希尔排序' => $shellSort,
            '归并排序' => $mergeSort,
            '计算排序' => $countingSort,
            '堆排序'  => $heapSort,
        ]);
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

3373d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37436e7335e3222e043f1df0dcf4d7ab2bf8b64ec98d5fb655d2dd8ed4e26e69?d=identicon)[frowhy](/maintainers/frowhy)

---

Top Contributors

[![frowhy](https://avatars.githubusercontent.com/u/16863314?v=4)](https://github.com/frowhy "frowhy (5 commits)")

### Embed Badge

![Health badge](/badges/frowhy-algorithm/health.svg)

```
[![Health](https://phpackages.com/badges/frowhy-algorithm/health.svg)](https://phpackages.com/packages/frowhy-algorithm)
```

###  Alternatives

[helgesverre/domain-availability

A PHP library for checking if a domain name is registered or not

26519.1k1](/packages/helgesverre-domain-availability)[it-quasar/atol-online

Библиотека для работы с АТОЛ Онлайн

109.5k](/packages/it-quasar-atol-online)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
