Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

PHP-Data-Structure-and-Algorithms

> 编程语言
Open source

A repository with implementations of different data structures and algorithms using PHP

627 stars0 likes0 views
WebsiteGitHub

About

A repository with implementations of different data structures and algorithms using PHP

PHP Data Structures and Algorithms

Data structure and Algorithm is always important for any programming language. PHP, being one of the most popular language for web development, also requires the pure data structure and algorithm implementations.

In this project, i am trying to cover major data structure and algorithm implementations using PHP 7. For more details discussion about the topics, you can read my book , https://www.amazon.com/PHP-7-Data-Structures-Algorithms/dp/178646389X/

Any feedback, bugs or suggestion will be welcomed.

Topics covered

  1. Linked List

    • Single Linked list
    • Circular Linked list
    • Doubly Linked List
  2. Stacks

    • Stack using Array
    • Stack using Linked List
  3. Queues

    • Queue using Array
    • Queue using Linked List
    • Priority Queue
    • Circular Queue
    • Double Ended Queue - DeQueue
  4. Trees

    • Generic Tree
    • Binary Tree
    • Binary Search Tree
    • Tree Traversal (In-order, pre-order, post-order)
    • Trie (Simple insert and search operation)
  5. Heaps

    • Min Heap
    • Max Heap
  6. Graph

    • BFS
    • Bellman Ford Algorithm
    • DFS
    • Dijkstra
    • Floyd Warshall
    • Kruksal
    • Prim Minimum Spanning tree
    • Topological Sorting
  7. Sorting

    • Bubble sort
    • Bubble Sort with improvements
    • Bucket sort
    • Heap Sort
    • Insertion Sort
    • Merge Sort
    • Quick Sort
    • Radix Sort
    • Selection Sort
  8. Searching

    • BFS
    • Binary Search (Iterative)
    • Binary Search (Recursive)
    • DFS
    • DFS using Stack
    • Exponential Search
    • Interpolation Search
    • Repetitive Binary Search
  9. Dynamic Programming and Others

    • Sudoku (Backtracking)
    • Collaborative Filtering
    • DNA Sequencing (NeedlemanWunsch Algorithm)
    • 0/1 KnapSack Dynamic Programming
    • Fibonacci (Recursive)
    • Fibonacci (Memoized)
    • Huffman Encoding (Greedy Algorithm)
    • Job Scheduler (Greedy Algorithm)
    • KMP String matching algorithm
    • Longest Common Subsequences (LCS)
    • Pattern Matching
    • Sparse Array
  10. Numbers and Maths - PHP Big Integer Implementation - Prime number generation - Sieve

I know lots of things are missing in the list? Would you mind to let me know what you wanna see implemented? I will priortize those and add here.

Coming Soon

  • AVL tree implemenations
  • Project Euler Solutions in PHP for Hackerrank.com
  • More algorithms

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言