jiraspe21/sorted-linked-list

A brief description of your package.

Maintainers

Package info

gitlab.com/jiraspe21/sorted-linked-list

Issues

pkg:composer/jiraspe21/sorted-linked-list

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.3 2024-10-30 01:30 UTC

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 int or all string)

Requirements

  • PHP 8.1 or higher
  • Composer

Installation

To install the package, you can use Composer:

composer require jiraspe21/sorted-linked-list

TODO finish this readme