Function to convert decimal number n to its binary representation stored as an array arr [ ]
void decBinary ( int arr [ ] , int n ) { int k = log2 ( n ) ; while ( n > 0 ) { arr [ k -- ] = n % 2 ; n /= 2 ; } }