Skip to content

A linked list implementation in PHP done for a job interview

Notifications You must be signed in to change notification settings

kburton-dev/php-linked-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

php-linked-list

A linked list implementation in PHP. This linked list will maintain an ordered list of nodes from smallest to greatest. Inserting a new node will place it in the correct position, so the list should never need to be reordered.

It is considered a "stable order" as new nodes that are added, are placed after nodes with the same value.

Additionally, the linked list can also be reversed using $list->reverse();.

To run

php index.php

Output

1, 1, 2, 2, 2, 3, 5, 7, 8, 9
9, 8, 7, 5, 3, 2, 2, 2, 1, 1

About

A linked list implementation in PHP done for a job interview

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages