Swap two elements

Java Easy 4 views
Back to Questions
Next Copy array manually Easy N

Problem Description

Task: swap a[i] and a[j] in an int array.

Input Format

Java method

Output Format

In-place update

Constraints

Check bounds.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Next