Swap Two Numbers Without Using third (temp) Variable | Number Swapper |Cracking The Coding Interview

Опубликовано: 29 Март 2026
на канале: swadhyayedu
5,475
186

Problem Statement:

Write a function to swap a number in place
(without temporary variables)

The code below implements this.
Example a = 9, b = 4
Output: a = 4 ; b = 9.

Also check out our other videos :

Single number 2 - Bit Manipulation :    • Single Number 2-Bit manipulation LeetCode ...  

Single number 2- Hashmap solution :    • Single Number 2- LeetCode 137 | Coding pro...  

Single number 1 - Bit manipulation :    • Single Number 1-Bit Manipulation (Solution...  

Single number 1 - Hashmap solution :    • Single Number 1 - HashMap Solution || Leet...  

Frequently asked JavaScript interview questions- part 1:    • Top 5 JavaScript Interview Questions | Mos...  

Follow us on instagram :
  / codegeekslab  

  / swadhyayedu  

Like our facebook page :

  / codegeekslab-100101071766280  


#Crackingthecodeinterview #interviewquestions
#Google #LeetCode