Professional Documents
Culture Documents
Prblms Bit
Prblms Bit
1.) find missing number in array If n is the array size and from 0 to n elements are there in array
Sol : find the sum of original array and the given array then subtract.
Sol:
{
public:
int maxConsecutiveOnes(int N)
{
int cnt = 0;
int maxi = 0;
for(int i = 0;i < 32;i++)
{