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 .
static void grayCodeUtil ( Vector < Integer > res , int n ) {