Ad
  • Default User Avatar

    因为格式化的原因 看不太懂你的代码的运作机制 。。。

    不知道你是否陷入题目陷阱,题目意思有:相邻的元素,方向如果是相反的,则同时放弃这两步

    我也陷入这这个陷阱导致有一段时间没解决问题

    Note
    
    All paths can't be made simpler. The path ["NORTH", "WEST", "SOUTH", "EAST"] is not reducible. "NORTH" and "WEST", "WEST" and "SOUTH", "SOUTH" and "EAST" are not directly opposite of each other and can't become such. Hence the result path is itself : ["NORTH", "WEST", "SOUTH", "EAST"].
    
  • Default User Avatar

    Hi! using ```{{ Your Codes Here }}``` to format your code and make it beauty

    {{ Your Codes Here }}
    
  • Custom User Avatar

    Yes, I got some troubles with it too.
    On the output formatting paragraph, it says :
    "The two subarrays are sorted in ascending order by their number weights if these weights are different, BY THEIR INDEXES IN THE STRING IF THEY HAVE THE SAME WEIGHTS."

    The uppercase part of the paragraph is a lie.
    The only sort you have to follow is the one on the weights.

    Thank you, I just lost 30 minutes wondering why my solution wasn't working.