• Custom User Avatar

    To make myself feel better I'd say, those of us who actually wrote an algorithm are geniuses too, instead of using built-in functions. :P

  • Custom User Avatar

    Because the result SOUTH, NORTH, WEST still has the opposite pole next to each other, i.e SOUTH, NORTH. It is also mentioned in the description towards the end. I hope this helps.

  • Custom User Avatar

    This is exactly how I solved it. I initially used Replace method in place of Append but the later turned out to be more time efficient.