Some example and test code for PHP data structures and Algorithms.
- Basic linked list
- Doubly linked list
- Circular linked list
- Priority linked list
- Array queue
- Linked list queue
- Priority linked list queue
- Array stack
- Basic Tree
- Binary Tree
- Min heap
Example usage:
- Expression checker
- Bubble Sort
- Bucket Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Selection Sort
- Topological sorting
- Linear Search
- Binary Search
- Exponential Search
- Interpolation Search
- Graph Depth First Search
Example usage:
- Factorial
- Fibonacci
- Greatest common division
- Kruskal's minimum spanning tree
- Prim's minimum spanning tree
- Bellman Ford shortest path
- Dijkstra's shortest path
- Floyd Warshall's shortest path
$ ./vendor/bin/phpunit
$ ./vendor/bin/php-cs-fixer fix --diff --dry-run -v
$ ./vendor/bin/phpmd src text phpmd.xml
$ ./vendor/bin/phpstan analyze -c phpstan.neon src tests --level=max