2017 © Pedro PelĂĄez
 

library data-structure

Provides implementations of data structures.

image

localheinz/data-structure

Provides implementations of data structures.

  • Wednesday, February 28, 2018
  • by localheinz
  • Repository
  • 1 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 5 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

data-structure

CI Status codecov Latest Stable Version Total Downloads, (*1)

This package provides implementations of data structures., (*2)

Installation

Run, (*3)

$ composer require localheinz/data-structure

Data Structures

  • Localheinz\DataStructure\Queue
  • Localheinz\DataStructure\Stack

Queue

use Localheinz\DataStructure\Queue;

$queue = new Queue();

$queue->isEmpty(); // true
$queue->isFull(); // false

$queue->enqueue('foo');
$queue->enqueue('bar');
$queue->isEmpty(); // false
$queue->isFull(); // false

$queue->dequeue(); // 'foo'
$queue->dequeue(); // 'bar'
$queue->isEmpty(); // true
$queue->isFull(); // false

$maxSize = 1;

$anotherQueue = new Queue($maxSize);

$anotherQueue->enqueue('foo');
$anotherQueue->isFull(); // true

Stack

use Localheinz\DataStructure\Stack;

$stack = new Stack();

$stack->isEmpty(); // true
$stack->isFull(); // false

$stack->push('foo');
$stack->push('bar');
$stack->isEmpty(); // false
$stack->isFull(); // false

$stack->peek(); // 'bar'

$stack->pop(); // 'bar'
$stack->pop(); // 'foo'
$stack->isEmpty(); // true
$stack->isFull(); // false

$maxSize = 1;

$anotherStack = new Stack($maxSize);

$anotherStack->push('foo');
$anotherStack->isFull(); // true

Changelog

Please have a look at CHANGELOG.md., (*4)

Contributing

Please have a look at CONTRIBUTING.md., (*5)

Code of Conduct

Please have a look at CODE_OF_CONDUCT.md., (*6)

License

This package is licensed using the MIT License., (*7)

The Versions

28/02 2018

dev-master

9999999-dev https://github.com/localheinz/data-structure

Provides implementations of data structures.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Andreas Möller

27/01 2018

dev-feature/urls

dev-feature/urls https://github.com/localheinz/data-structure

Provides implementations of data structures.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Andreas Möller

17/09 2017

dev-feature/singly-linked-list

dev-feature/singly-linked-list

Provides implementations of data structures.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Andreas Möller