Skip to content

Instantly share code, notes, and snippets.

@nielslange

nielslange/find_uniq.php

Last active Feb 24, 2020
Embed
What would you like to do?
<?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
You can’t perform that action at this time.