Skip to content

ali-web/PHPCircularLinkedList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

PHPCircularLinkedList

A simple class with provides Circular linked list data structure for your next PHP applications

Installation

Download the CircularLinkedList.php file and place it to an appropriate directory of project and then simply include the file:

require_once 'CircularLinkedList.php';

Usage

You can create a circular linked list object and use the class functions to add and read items:

$cll = new CircularLinkedList();

To push a single item:

$cll->push($item);

To push an array of items:

$cll->push_array(array($item1, $item2));

To find and point to a specific item:

$cll->find($item);

To point to the next item and get it:

$cll->getNext();

To get the length of the linked list:

$cll->length();

To see content of the whole list:

$cll->printList($item);

About

A simple class with provides Circular linked list data structure for your next PHP applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages