jiraspe21 / sorted-linked-list
A brief description of your package.
v1.0.3
2024-10-30 01:30 UTC
Requires
- php: ^8.1
Requires (Dev)
- overtrue/phplint: ^9.5
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2026-03-29 01:16:11 UTC
README
A PHP package that implements a sorted linked list supporting getting its head, tail, insertion, deletion, traversal, and merging. This package supports sorting in either ascending or descending order and ensures that all items in the list are either int or string. It is done as a job interview assignment.
Features
- Insert items in a sorted order (either ascending or descending)
- Delete items from the list
- Traverse the list with a custom callback
- Reduce the list to a single value using a reducer
- Merge two sorted lists into one
- Support for generics-like behavior (all items must be either all
intor allstring)
Requirements
- PHP 8.1 or higher
- Composer
Installation
To install the package, you can use Composer:
composer require jiraspe21/sorted-linked-list