Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solution($A) {
- // write your code in PHP7.0
- $values=array_count_values($A);
- $unpaired=0;
- foreach($values as $key=>$value){
- if(($value % 2===1)){
- $unpaired=$key;
- }
- }
- return $unpaired;
- }
Add Comment
Please, Sign In to add comment