You are viewing a single comment's thread. Return to all comments →
php
function missingNumbers($arr, $brr) { $countValuesArr = array_count_values($arr); $countValuesBrr = array_count_values($brr); $result = []; foreach($countValuesBrr as $val => $count) { if(!isset($countValuesArr[$val])) { $result[] = $val; continue; } if($count > $countValuesArr[$val]) { $result[] = $val; } } $result = array_unique($result); sort($result); return $result; }
Seems like cookies are disabled on this browser, please enable them to open this website
Missing Numbers
You are viewing a single comment's thread. Return to all comments →
php