Created
February 24, 2018 09:52
-
-
Save capfsb/c857127d6252170991aec127c7fbae77 to your computer and use it in GitHub Desktop.
This file contains 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
<? | |
$a=[1,1,1,2,3,3,4,5,5,5,5,6,6,6,6]; | |
foreach($a as $v) | |
{ | |
$count[$v] = $count[$v] ?? 0; | |
++$count[$v]; | |
} | |
echo join(' ',array_keys(array_filter($count,function($v){return $v % 2 == 1;}))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment