Mystery Function Time : Space : 12345678910111213141516ulong mystery(ulong n){ return n ^ (n >> 1);}ulong mysteryInv(ulong n){ ulong mask = n >> 1; while(mask) { n ^= mask; mask >>= 1; } return n;}std::string nameOfMystery(){ return "Gray code";}