Pergunta de entrevista da empresa Gemalto

How to swap 2 variables without using a third variable. And the team leader asked to write a code snippet for assigning 5 colors to the countries on the world map so that no adjacent country has same color.

Respostas da entrevista

Sigiloso

28 de jan. de 2016

Use XOR

Sigiloso

11 de ago. de 2014

x = x + y; y = x - y; x = x - y;

7