Вопрос

I want to know if there is any algorithm in PHP which would be the equivalent algorithm of the timsort algorithm implemented in Python for sorting lists ?

It so happened that I had to translate some code from python to php.

Нет правильного решения

Другие советы

According to wiki python's sort() is a timsort

http://en.wikipedia.org/wiki/Timsort

you could always try to write your own implementation of timsort in php. I suggest reading up on timsort and looking at a few examples.

https://github.com/swenson/sort

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top