maxwilms / data-structures
Collection of data structures for PHP
dev-master
2015-08-06 12:50 UTC
Requires (Dev)
- phpspec/phpspec: ^2.2
This package is not auto-updated.
Last update: 2024-12-21 18:59:32 UTC
README
Collection of Data Structures for various purposes.
Installation
First install composer.
Require the data structure collection via composer:
composer require maxwilms/data-structures
Now you are ready to use it!
BitArray
Data Structure to compactly store bits.
<?php
use maxwilms\DataSructures\BitArray;
$bitArray = new BitArray(1000); // should store 1000 bits.
$bitArray->set(3); // set a single bit
$bitArray->has(3); // true
$bitArray->has(17); // false