Pergunta de entrevista da empresa SolarEdge Technologies

How to change between 2 variable values without a third variable

Resposta da entrevista

Sigiloso

5 de dez. de 2021

The idea is to get a sum in one of the two given numbers. The numbers can then be swapped using the the sum & subtraction from the sum. Example: Given two var: x,y x=x+y y=x-y x=x-y