HackerRank | 1 Week Preparation Kit | Lonely Integer hackerrank solution in python | Day 2

preview_player
Показать описание
Problem
Given an array of integers, where all elements but one occur twice, find the unique element.
Example
a = [1,2,3,4,3,2,1]
The unique element is 4.

Function Description
Complete the lonelyinteger function in the editor below.
lonelyinteger has the following parameter(s):
int a[n]: an array of integers

Returns
int: the element that occurs only once
Рекомендации по теме