This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Sort { | |
| public static function radix_sort($input) { | |
| $min = min($input); | |
| $max = max($input); | |
| $temp = array_fill($min, $max - $min + 1, 0); | |
| foreach ($input as $key => $val) { | |
| $temp[$val]++; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Class that validate and retrieve data from PESEL number in object-oriented style | |
| * | |
| * Example: | |
| * $pesel = new Pesel('85042510356'); | |
| * $pesel->getBirthday()->format("d-m-Y") | |
| * $pesel->getSex() | |
| * $pesel->getAge("%a") |
NewerOlder