Find the difference between the largest and smallest elements in a list.
MediumProblem Statement
Find the difference between the largest and smallest elements in a list.
Sample Input
[8, 3, 1, 9, 7, 2]
Sample Output
8
Limits
Time: 2s · Memory: 256 MB