athenahealth interview question

Find max difference in an array