- https://www.codewars.com/kata/523a86aa4230ebb5420001e1 Where my anagrams at?
Started at 19:05 25.09.2020 Friday Sep.
Finished at 19:23 25.09.2020 Friday Sep. (0hrs 18minutes)
<?php | |
# https://www.codewars.com/kata/523a86aa4230ebb5420001e1 Where my anagrams at? | |
function anagrams(string $word, array $words): array { | |
$histogram = count_chars($word,1); | |
$compare = function($substr) use ($histogram){ | |
return $histogram == count_chars($substr,1); | |
}; | |
return array_values(array_filter($words,$compare)); | |
} |
Started at 19:05 25.09.2020 Friday Sep.
Finished at 19:23 25.09.2020 Friday Sep. (0hrs 18minutes)