Minimum and maximum differences

Problem Name:
Minimum and maximum differences
Site:HackerEarth
Links:
Tags:
Problem setters: