I am new to Discrete math and i do not know how to solve this sum if some can please help me ..

Describe an algorithm that takes as input a list of n integer and produce as out put the largest difference obtained by subracting an integer in the list from the one following it.