Bit Array Hackerrank Solution Cpp