Part 1. Definition
In this task, you are given a list of unique integers you need to swap the positions of maximum and minimum element in the list and return the updated list.
Part 2. Example
[1,45,67,43,58,98,41,34,57]
Answer: [98,45,67,43,58,1,41,34,57]
Explanation: 1 is the minimum element and 98 is the maximum element and their positions are swapped in the resulting list.
Part 3. Exercise
[134, 90, 332, 408, 359, 366, 186, 335, 474, 378, 249, 307, 302, 421, 171, 461, 422, 30, 344, 295]
Answer:
[134, 90, 332, 408, 359, 366, 186, 335, 30, 378, 249, 307, 302, 421, 171, 461, 422, 474, 344, 295]