From 5557766f306b39f99be4beadbad31fb964db3bca Mon Sep 17 00:00:00 2001 From: Ravi Mandliya Date: Tue, 15 Sep 2015 00:07:22 -0400 Subject: [PATCH] Day 30 - more bit manipulation problems. --- bit_manipulation/find_odd_one_out.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bit_manipulation/find_odd_one_out.cpp b/bit_manipulation/find_odd_one_out.cpp index a211e59..df398f7 100644 --- a/bit_manipulation/find_odd_one_out.cpp +++ b/bit_manipulation/find_odd_one_out.cpp @@ -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. */