Skip to content

_49 test case seems to be incorrect #72

@pacificlion

Description

@pacificlion

Hi,
the test case written for _49 does not check if anagrams are grouped together correctly. It only cares if all the elements given in input are a part of the actual ArrayList. Eg: if I have incorrect grouping as follows for expected , the test case will still pass:

{
  {"eat", "ate", "tea"},
  {"tan"},
  {"nat","bat"}
}

assertEquals(expected.containsAll(actual), actual.containsAll(expected));

Please let me know if I missed anything

Regards,
Prashant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions