Created
January 17, 2016 03:10
-
-
Save rafaelbernard/1022fb30c3648707b559 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
<?php | |
// you can write to stdout for debugging purposes, e.g. | |
// print "this is a debug message\n"; | |
function solution($A) { | |
$a_count_values = array_count_values($A); | |
$values = array_keys($a_count_values, 1); | |
if (is_array($values)) | |
return $values[0]; | |
return $values; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment