Solution to Find the Abnormal Number

29 Aug

This morning, I suddenly remembered this challenge. But I nearly forgot the answer. I’d better to record it here for latter review.

Question Name: Find the Abnormal Number

Question Description: in a given integer array, every number, except one, appears N times. The exceptional number appear M times, where M % N != 0. Find the abnormal number.

The solution uses a lot of bit operations.

2 Replies to “Solution to Find the Abnormal Number

Leave a Reply

Your email address will not be published. Required fields are marked *

Please put your code into a <pre>YOUR CODE</pre> section. Thanks and Happy Coding!