DEV Community 👩‍💻👨‍💻

Discussion on: How can you swap two variables without using a third?

Collapse
 
gmartigny profile image
Guillaume Martigny

As funny as it is, you declare a new pointer to the swap function allocating new memory.