Skip to content

awesome-php-code/sorting-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📌 Sorting Algorithms in PHP

This repository shows you several sorting algorithms implementations in PHP.

❗ This code is not intended to be used as library in other projects, that's because it's not installable. Just use it for educational purposes. Please feel free to post any issues you'll could find here.

What is a sorting algorithm ❓

In computer science, a sorting algorithm is an algorithm that puts elements of a list into an order. For instance, if you have the set of elements [5,4,3,2,1] you could use a sorting algorithm to order this list as [1,2,3,4,5].

Supported Algorithms

✅ Bubble sort algorithm (Go to implementation).

📚 Usage

Bubble Sort algorithm

use AwesomePhpCode\SortingAlgorithms\BubbleSort;

// [1,2,3,4,5]
$ordered = BubbleSort::sort([5,4,3,2,1]);

About

Sorting algorithms in PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages