Last active
February 24, 2020 08:02
-
-
Save nielslange/104accb4ea87f90aef2a944247f35aa1 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 | |
function find_uniq(array $array): int { | |
sort($array); | |
if ( $array[0] === $array[1] ) rsort($array); | |
return $array[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment