I've reached what is to be the most simple part of my program but I am a bit lost, on how I can do this part and keep it efficient at the same time.
attacker= {3,10,14,15,17,18};
defender = {1,5,7,9,12,18};
So both of these are two arrays of same length, and also sorted. To put this in context the numbers in both arrays represent rolls entered in by the user.
Except in this risk the defender is allowed to rearrange his array so that he can win more battles. So he can pair 5 with 3, if he wanted.
I'm lost on how to do this without being incredibly inefficient or prone to much error.