we have 2 choices for each of the n bits either we can include i . e invert the bit or we can exclude the bit i . e we can leave the number as it is .
void grayCodeUtil ( vector < int > & res , int n , int & num ) {