LeetCode test bug in the new version of Anagrams

  • 0

    Just because the order is different, leetcode think it's wrong.

    Submission Result: Wrong Answer




  • 1

    You're clearly violating this clearly stated requirement:

    1.For the return value, each inner list's elements must follow the lexicographic order."

    Your ["tea","ate","eat"] isn't in lexicographic order.

  • 0

    Thanks for pointing it out. So I just add Collections.sort(eachStringList), that requirement makes no sense at all.

  • 0

    Facing similar issue for Group Anagrams problem. Ordering given in problem description is different from expected answer and pattern is not clear. Also, Problem doesn't mentions lexicographic order currently.

    As per problem description:
    For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"],
    ["ate", "eat","tea"],

    As per expected answer:
    Expected answer

    In expected answer, list with "ate" is 2nd while with "bat" is 1st. Also 1st list has 1 element, 2nd has 3 elements and 3rd has 2 elements.

  • 1

    @Yogesh Yes, it was changed recently. See how the problem still looked three months ago.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.