Ad
  • Custom User Avatar

    In that case, you could try using a (circular) linked list in your solution.

  • Custom User Avatar

    I am currently grabbing the original index from whichever one that appears first in the original list even if it was the second solider who survived.

    It's not entirely clear what you're asking. It sounds like you may be asking if the winning army should return the index of its surviving soldiers in ascending order, but this wouldn't make sense if you're passing the sample tests.