Helper method : given two unequal sized bit strings , converts them to same length by adding leading 0 s in the smaller string . Returns the the new length
int makeEqualLength ( string & a , string & b ) { int len_a = a . length ( ) ; int len_b = b . length ( ) ; int num_zeros = abs ( len_a - len_b ) ; if ( len_a < len_b ) { for ( int i = 0 ; i < num_zeros ; i ++ ) { a = '0' + a ; }