Download the PHP package siro-diaz/data-structures without Composer

On this page you can find all versions of the php package siro-diaz/data-structures. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package data-structures

DataStructures Build Status Scrutinizer Code Quality

Data structures for PHP >= 7.0. Use data structures in your project using this library.

Index

Install
API

List implementations

Via Composer just copy and paste:

API

Lists

The list data structures supported are the following:

list type: class

Singly linked list

Introduction

Singly linked list is the simplest linked list that can be created. It has a pointer to the next node in the list and the last node points to null. All lists except stacks and queues have the same methods because they implements the same interface.

Methods

Circular linked list

Introduction

Circular linked list is a singly linked list that has a pointer to the last and first node. All lists except stacks and queues have the same methods because they implements the same interface.

Methods

Doubly circular linked list

Introduction

Doubly circular linked list is a doubly linked list that each node contained in the list contains a pointer to the next and previous node. In the of the first node it is going to point to the last node. It uses some performance tricks for insert, get, and delete operations.

Methods
Example

Array list

Introduction

Array list uses the built in arrays as lists. In PHP all uses hash tables and it give array lists some performance advantages in operations like get that will be O(1). Array list auto increments their size internally, without the necessity of increment it manually. It is translates in a very easy way to implement this type of list.

Methods
Example

Stack

Introduction

Stack is a LIFO (Last In First Out) data structure that works like a stack (as its name said). Last element that is inserted will be the first in going out. The implementation used in this library allow to especify a maximum size, in other words, it can be a limited stack. When limited stack is been used is important check if it is full before insert a new element.

Methods
Example

Trees

The tree data structures supported are the following:

tree type: class

Trie tree

Introduction

Singly linked list is the simplest linked list that can be created. It has a pointer to the next node in the list and the last node points to null. All lists except stacks and queues have the same methods because they implements the same interface.

Methods

Binary Search Tree

Introduction

Binary search tree (BST) is a data structure which has a root node that may have up to 2 siblings. Each sibling also can have a maximum of 2 siblings. If the node have not siblings it is called leaf node. The left sibling is lower than the parent node and right sibling is grater than it parent.

Methods

AVL Tree

Introduction

AVL Tree is a binary search tree that has a balance condition. The condition consists in each subnode can have a maximum height of one respect the oposite side subtree (it means that right subtree of a node can't be higher than one, compared with the left subtree). If it has a height of two or more then is rebalanced the tree using a single left rotation, single right rotation, double left rotation or a double right rotation.

Methods

Same method that binary search tree.

Example

All versions of data-structures with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package siro-diaz/data-structures contains the following files

Loading the files please wait ....