So I am stuck in a question at the logic (meaning I have yet started to write much code on the major part of the algorithm).
So I have n values stored either in an ar