Confused on this question

That’ll fail with any array in which the max difference isn’t between the max number and the min number before it, e.g. just changing one number from the second example to arr = []int{7, 9, 1, 6, 3, 2} (it should return 5, but it’ll return 2 instead).

Anyway, I think the idea in these cases is to help the poster solve their problem by looking at what they’ve done and pointing out any mistakes or guide them towards the solution, rather than just throw some code that solves it.