Skip to content

[FEATURE] Swap 2 numbers using Bit Manipulation #2016

@Mrjoy832

Description

@Mrjoy832

Detailed description

Hey , I want to add detailed documentation , code of Swapping 2 numbers using Bit Manipulation.
The Lanugauge I will use for solving this issue will be C++.

Context

Its an important interview question that Swap 2 numbers without using 3rd variable, In that mostly guys answer using some staff like doing some sort of addition , substraction but there if you answer with using Bit-manipulation then it will be eye catching and also better in case of Time complexity also .

Possible implementation

I will use XOR operation to solve this question, and will be using C++

Additional information

Please assign me ASAP... I want to work on it.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions