$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #245

What goes in the blank?

# swap two elements in place
arr[i], arr[j] = arr[j], arr[____]

Answer: i (also accepted: i)

Tuple assignment swaps both sides at once, so arr[i] goes to arr[j].
Play Problem Solving ▸