Swap Two Numbers

In this lesson, we make use of the XOR operator to swap the values of two inputs.

Introduction

In this question, input two numbers and swap them without using the swapping logic.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.