Ad
  • Custom User Avatar

    Javascript, and thanks for the suggestion. I didn't know that logging shows up right next to each test case.

  • Custom User Avatar

    I have my code recursively reduce the array until it doesn't have any adjacent complements (North and South, etc.). It passes all the test cases except for these two:

    Expected: '['EAST', 'NORTH']', instead got: '['EAST', 'NORTH', 'EAST', 'WEST']'
    Expected: '['NORTH', 'EAST']', instead got: '['NORTH', 'EAST', 'NORTH', 'SOUTH']'

    When I run ['EAST', 'NORTH', 'EAST', 'WEST'] on VSCode, it reduces it to ['EAST', 'NORTH'], and same thing for the latter case. I would like to know what the original test case for this was to learn what edge cases I need to iron out in my code.

    Thanks.