Problem Description

Task: swap a[i] and a[j] using XOR (only if i!=j).

Input Format

Java method

Output Format

In-place update

Constraints

Avoid when i==j.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next