feat(content): more test cases
This commit is contained in:
@@ -10,6 +10,24 @@ categories:
|
||||
patterns:
|
||||
- hashing
|
||||
|
||||
function_signature: "def group_anagrams(strs: list[str]) -> list[list[str]]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { strs: ["eat", "tea", "tan", "ate", "nat", "bat"] }
|
||||
expected: [["eat", "tea", "ate"], ["tan", "nat"], ["bat"]]
|
||||
- input: { strs: [""] }
|
||||
expected: [[""]]
|
||||
- input: { strs: ["a"] }
|
||||
expected: [["a"]]
|
||||
hidden:
|
||||
- input: { strs: ["abc", "bca", "cab", "xyz", "zyx"] }
|
||||
expected: [["abc", "bca", "cab"], ["xyz", "zyx"]]
|
||||
- input: { strs: ["", ""] }
|
||||
expected: [["", ""]]
|
||||
- input: { strs: ["listen", "silent", "enlist"] }
|
||||
expected: [["listen", "silent", "enlist"]]
|
||||
|
||||
description: |
|
||||
Given an array of strings `strs`, group the **anagrams** together. You can return the answer in **any order**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user