PHPackages                             krooyh/sorted-linked-list - 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. krooyh/sorted-linked-list

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

krooyh/sorted-linked-list
=========================

library providing a sorted linked list.

v1.1.0(10mo ago)01MITPHPPHP &gt;=8.4CI passing

Since Jun 17Pushed 2mo agoCompare

[ Source](https://github.com/krooyh/SortedLinkedList)[ Packagist](https://packagist.org/packages/krooyh/sorted-linked-list)[ RSS](/packages/krooyh-sorted-linked-list/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

PHP Sorted Linked List
======================

[](#php-sorted-linked-list)

[![Static Badge](https://camo.githubusercontent.com/d7b3f7aba5977772dd3b80426aa573ff32425bc306f61e2c67489c11c55d330b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505f56657273696f6e2d253345253344382e342d626c7565)](https://camo.githubusercontent.com/d7b3f7aba5977772dd3b80426aa573ff32425bc306f61e2c67489c11c55d330b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505f56657273696f6e2d253345253344382e342d626c7565)

The **Sorted Linked List** is library providing a sorted linked list functionality.

Requirements
------------

[](#requirements)

- PHP version &gt;= 8.4

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

[](#installation)

You can install the **Sorted Linked List** using the package manager [composer](https://getcomposer.org/).

```
  composer require krooyh/sorted-linked-list
```

Usage
-----

[](#usage)

> Sorted Linked List accepts ints and strings. By default, the list will be sorted in ascending order but you can specify the direction.
>
> If you provide an array of elements in the constructor, and you won't specify a type, the type will be inferred from the first element or exception will be thrown if the type is not supported.
>
> If you provide a type in the constructor, the list will be stored in that type.

```
