matejicekvojtech/sorted-linked-list
最新稳定版本:0.1.0
Composer 安装命令:
composer require matejicekvojtech/sorted-linked-list
包简介
Sorted linked list library. Test task for ShipMonk
README 文档
README
This library was created as task for ShipMonk recruiting process.
Installation
composer require matejicekvojtech/sorted-linked-list
Usage
This list can hold integer or string values sorted in ascending order. Value types of items in single list cannot mix (all values are either integer or string).
Create list
use VM\LinkedList\Model\SortedList /* ... */ $list = new SortedList(); // empty list
Insert value
$list->add(123); // list: 123 $list->add(111); // list: 111 -> 123
Find value
$item = $list->find(5); // item: null (not found) $item = $list->find(123); // item: SortedListItem {value: 123, next: null} $item = $list->find(111); // item: SortedListItem { // value: 111, // next: SortedListItem { // value: 123, // next: null // } // }
Remove value
$list->remove(5); // list: 111 -> 123 (not found) $list->remove(111); // list: 123
Author
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-15