Download the PHP package kariricode/data-structure without Composer
On this page you can find all versions of the php package kariricode/data-structure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kariricode/data-structure
More information about kariricode/data-structure
Files in kariricode/data-structure
Package data-structure
Short Description The KaririCode DataStructure component offers advanced PHP data structures, including lists, stacks, queues, maps, and sets. It features efficient, strongly-typed, object-oriented implementations like ArrayList, LinkedList, BinaryHeap, and TreeMap.
License MIT
Homepage https://kariricode.org/
Informations about the package data-structure
KaririCode Framework: Data Structure Component
The KaririCode Data Structure component provides a collection of advanced data structures implemented in PHP, designed with strong typing and object-oriented principles. It includes implementations for various common structures like dynamic arrays, linked lists, heaps, queues, maps, sets, and stacks.
Features
- ArrayList: A dynamic array providing fast access and amortized O(1) complexity for adding elements.
- LinkedList: A doubly linked list with O(1) insertion and removal at both ends, and O(n) for arbitrary index access.
- BinaryHeap: A binary heap (min-heap or max-heap) with O(log n) for insertions, removals, and polling.
- HashMap: A hash-based map providing average O(1) complexity for put, get, and remove operations.
- TreeMap: A self-balancing red-black tree map with O(log n) time complexity for put, get, and remove operations.
- TreeSet: A set implementation backed by
TreeMap
, ensuring elements are stored in a sorted order. - ArrayDeque: A double-ended queue using a circular array with amortized O(1) operations at both ends.
- ArrayStack: A stack implemented using a dynamic array, providing O(1) complexity for push, pop, and peek operations.
Installation
To install the KaririCode DataStructure component, use the following command:
Basic Usage
ArrayList Example
LinkedList Example
BinaryHeap Example
HashMap Example
TreeSet Example
ArrayStack Example
ArrayDeque Example
Testing
To run tests for the KaririCode DataStructure component, execute the following command:
License
This project is licensed under the MIT License. See the LICENSE file for details.
Support and Community
- Documentation: https://kariricode.org
- Issue Tracker: GitHub Issues
- Community: KaririCode Club Community
- Professional Support: For enterprise-level support, contact us at [email protected]
Built with ❤️ by the KaririCode team. Maintained by Walmir Silva - [email protected]