Math, asked by kannubhatt2994, 9 months ago

Given a number n followed by n numbers. All the numbers in the given input appear twice except for one number(ie one number appears only once in the given input). Find the number which appears only once.

Answers

Answered by Anonymous
6

Answer:

Input: arr[] = {12, 1, 12, 3, 12, 1, 1, 2, 3, 3}

Output: 2

In the given array all element appear three times except 2 which appears once.

Input: arr[] = {10, 20, 10, 30, 10, 30, 30}

Output: 20

In the given array all element appear three times except 20 which appears once.

Similar questions