Bit count in the following case
<p>I got the following questions in one of the interviews plz help me some ideas to solve it as am completely unaware how to proceed</p>

<p>A non-empty array A of N elements contains octal representation of a non-negative integer K, i.e. each element of A belongs to the interval [0; 7]</p>

<p>Write a function:</p>

<pre><code>int bitcount_in_big_octal(const vector&lt;int&gt; &amp;A);
</code></pre>

<p>that returns the number of bits set to 1 in the binary representation of K. The function should return -1 if the number of bits set to 1 exceeds 10,000,000.</p>

<p>Assume that the array can be very large.</p>

<p>Assume that N is an integer within the range [1..100,000].</p>
