Create a PHP script to implement the bubble sort algorithm.
MediumProblem Statement
Create a PHP script to implement the bubble sort algorithm.
Sample Input
[3, 1, 4, 2]
Sample Output
[1,2,3,4]
Limits
Time: 2s · Memory: 256 MB
Create a PHP script to implement the bubble sort algorithm.
[3, 1, 4, 2]
[1,2,3,4]
Time: 2s · Memory: 256 MB