LubosRemplik / SortedLinkedList

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sorted Linked List

Note: Not really LinkedList data structure

Tests

Library which works with LinkedList data structure and keeps nodes sorted.

Installation

composer require lubos/sorted-linked-list

Usage

use Lubos\SortedLinkedList\SortedLinkedList;

$list = new SortedLinkedList(['Ebay', 'Amazon']);
$list->insert('ShipMonk');

print_r($list->print());

// Output:
// Array
// (
//     [0] => Amazon
//     [1] => Ebay
//     [2] => ShipMonk
// )

Code style & QA

  • ECS vendor/bin/ecs check src tests
  • Psalm vendor/bin/psalm
  • PHPUnit vendor/bin/phpunit tests

About


Languages

Language:PHP 100.0%