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
[339, 40, 321, 337, 489, 221, 228, 415, 267, 120, 408, 287, 363, 317, 99, 193, 262, 474, 448, 443]
Answer:
[339, 489, 321, 337, 40, 221, 228, 415, 267, 120, 408, 287, 363, 317, 99, 193, 262, 474, 448, 443]