con_s1 [ i ] is going to store an integer whose set bits represent presence / absence of characters in set1 [ i ] . Similarly con_s2 [ i ] is going to store an integer whose set bits represent presence / absence of characters in set2 [ i ]
con_s1 , con_s2 = [ 0 ] * n , [ 0 ] * m NEW_LINE