UT Austin's course scheduling tools sometimes reorder items represented as arrays. Given an integer array and two valid indices, swap the elements at those indices in place and return the modified array.
Implement swap_elements(nums, i, j):
nums is a mutable list of integers.i and j are zero-based indices in nums.nums directly rather than creating a second array.i and j are equal, leave the list unchanged.def swap_elements(nums, i, j):