Added problem 7 and 4

added a reverse function and max array function