category-wise-problems

contains category wise problems(data structures, competitive) of popular platforms.

View the Project on GitHub mayankdutta/category-wise-problems

Make it equal, Medium

NOTE

Implementation ```cpp int makeItEqual(int a, int b, int c) { int p = a & b; int count = 0; for (int i = 0; i < 31; i++) { int current = (1 << i); int want = (c & current); if (want == 0) count += ((a & current) != 0 and (b & current) != 0); else { count += ((a & current) == 0 and (b & current) != 0); count += ((a & current) != 0 and (b & current) == 0); count += 2 * ((a & current) == 0 and (b & current) == 0); } } return count; } ```