PHPackages                             alireza\_malekei/number-expansion-tree - 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. alireza\_malekei/number-expansion-tree

ActiveLibrary

alireza\_malekei/number-expansion-tree
======================================

An efficient tree structure for finding duplicate number values (ex. phone numbers) in fixed-length strings

00PHP

Since Jul 17Pushed 1w agoCompare

[ Source](https://github.com/alirezaMalekei/number-expansion-tree)[ Packagist](https://packagist.org/packages/alireza_malekei/number-expansion-tree)[ RSS](/packages/alireza-malekei-number-expansion-tree/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

An efficient tree-based data structure for detecting duplicate number values in fixed-length strings (e.g. phone numbers, national IDs, account numbers, etc.).

✨ Features

1. Fast: Detects duplicates in O(n) time complexity
2. Memory Efficient: Uses only O(d × L) memory (d = distinct strings, L = fixed length)
3. Simple and Clean
4. Zero Dependencies: No external libraries required
5. PHP 8.0+ Compatible

📦 Installation

```
  composer require alireza_malekei/number-expansion-tree:dev-main

```

🚀 Usage

Basic Example

```
  use Module\CircularChain;

  // List of phone numbers (fixed length: 10 digits)
  $phones = [
      '09138332910',
      '09135633375',
      '09138332910',
      '09138332910',
      '09135633375',
      '09121001010'
  ];

 $chain = new SoleDetectorTrie($phones); // Fixed length = 10

```

Total Count

```
  $chain->totalCount;

```

Output:

```
  6

```

Repeating Count

```
$chain->repeatingCount;

```

Output:

```
  3

```

Sole Count

```
$chain->soleCount;

```

Output:

```
  3

```

Repeating Entries

```
$chain->repeating;

```

Output:

```
09138332910
09138332910
09135633375

```

Sole Entries

```
$chain->soles:

```

Output:

```
09138332910
09135633375
09121001010

```

👤 Author

Alireza Maleki

GitHub: @alirezaMalekei

Packagist: alireza-malekei

⭐ If this package helped you

Please give it a star ⭐ on GitHub so others can discover it too.

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance64

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150526400?v=4)[Alireza](/maintainers/alirezaMalekei)[@alirezaMalekei](https://github.com/alirezaMalekei)

---

Top Contributors

[![alirezaMalekei](https://avatars.githubusercontent.com/u/150526400?v=4)](https://github.com/alirezaMalekei "alirezaMalekei (13 commits)")

### Embed Badge

![Health badge](/badges/alireza-malekei-number-expansion-tree/health.svg)

```
[![Health](https://phpackages.com/badges/alireza-malekei-number-expansion-tree/health.svg)](https://phpackages.com/packages/alireza-malekei-number-expansion-tree)
```

PHPackages © 2026

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