The main task of this problem is to perform swaps. The simplest way to swap two numbers A and B is as follows:

  1. Take a temporary variable C.

  2. Assign A to C.

  3. Copy B to A.

  4. Copy C to B.

Swapping can also be performed without the temporary C. Why?

Setter’s Complexity: O(S)

Statistics

66% Solution Ratio
anonyo.akandEarliest, Jun '21
drmc1234Fastest, 0.0s
drmc1234Lightest, 5.5 kB
Nusab19Shortest, 134B
Toph uses cookies. By continuing you agree to our Cookie Policy.