Skip to content

Duplication elements in an array. #2366

@ishika22

Description

@ishika22

Is your feature request related to a problem? Please describe.
We have an array where every element occurs twice. Only 2 elements are there which do not repeat. We need to find the 2 numbers with the help of bitwise operators

Describe the solution you'd like
Using the concept of bitwise AND, bitwise XOR to approach the above problem.

Sample Testcase
Input: 1,5,7,5,7,3
Output: 1,3

@siriak can you please assign this issue to me

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions