Skip to content

Commit

Permalink
Day 30 - more bit manipulation problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
mandliya committed Sep 15, 2015
1 parent 16e7b9b commit 5557766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bit_manipulation/find_odd_one_out.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Given a vector of numbers, only one number occurs odd number of times, find the number
* Example - { 1, 1, 2, 2, 2, 3, 3, 3, 3} ==> Answer 3
* Example - { 1, 1, 2, 2, 2, 2, 3, 3, 3} ==> Answer 3
* Approach - XOR of number with itself is 0, so even numbers will cancel out
* and we will be left with odd number.
*/
Expand Down

0 comments on commit 5557766

Please sign in to comment.