You are viewing a single comment's thread. Return to all comments →
php
function lonelyinteger($a) { $count = [ ]; foreach ($a as $num) { $count[$num] ?? 0; $count[$num]++; } foreach ($count as $i => $v) { if ($v == 1) return $i; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Lonely Integer
You are viewing a single comment's thread. Return to all comments →
php